~ubuntu-branches/ubuntu/gutsy/blender/gutsy-security

« back to all changes in this revision

Viewing changes to source/gameengine/Expressions/Value.h

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2005-11-06 12:40:03 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051106124003-3pgs7tcg5rox96xg
Tags: 2.37a-1.1
* Non-maintainer upload.
* Split out parts of 01_SConstruct_debian.dpatch again: root_build_dir
  really needs to get adjusted before the clean target runs - closes: #333958,
  see #288882 for reference

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * Value.h: interface for the CValue class.
3
 
 * $Id: Value.h,v 1.6 2004/03/22 22:01:29 jesterking Exp $
 
3
 * $Id: Value.h,v 1.9 2004/11/22 10:19:18 kester Exp $
4
4
 * Copyright (c) 1996-2000 Erwin Coumans <coockie@acm.org>
5
5
 *
6
6
 * Permission to use, copy, modify, distribute and sell this software
182
182
// 
183
183
//
184
184
 
185
 
/**
186
 
 * These macros are helpfull when embedding Python routines. The second
187
 
 * macro is one that also requires a documentation string
188
 
 */
189
 
#define KX_PYMETHOD(class_name, method_name)                    \
190
 
        PyObject* Py##method_name(PyObject* self, PyObject* args, PyObject* kwds); \
191
 
        static PyObject* sPy##method_name( PyObject* self, PyObject* args, PyObject* kwds) { \
192
 
                return ((class_name*) self)->Py##method_name(self, args, kwds);         \
193
 
        }; \
194
 
 
195
 
#define KX_PYMETHOD_DOC(class_name, method_name)                        \
196
 
        PyObject* Py##method_name(PyObject* self, PyObject* args, PyObject* kwds); \
197
 
        static PyObject* sPy##method_name( PyObject* self, PyObject* args, PyObject* kwds) { \
198
 
                return ((class_name*) self)->Py##method_name(self, args, kwds);         \
199
 
        }; \
200
 
    static char method_name##_doc[]; \
201
 
 
202
 
/* The line above should remain empty */
 
185
 
203
186
 
204
187
#ifndef NO_EXP_PYTHON_EMBEDDING
205
188
#include "PyObjectPlus.h"
239
222
 
240
223
 
241
224
 
242
 
        PyObject*                       _getattr(char* attr);
 
225
        virtual PyObject*                       _getattr(const STR_String& attr);
243
226
 
244
227
        void    SpecialRelease()
245
228
        {
266
249
        virtual CValue* ConvertPythonToValue(PyObject* pyobj);
267
250
 
268
251
 
269
 
        int                                     _setattr(char* attr,PyObject* value);
 
252
        virtual int                             _delattr(const STR_String& attr);
 
253
        virtual int                             _setattr(const STR_String& attr,PyObject* value);
270
254
        
271
255
        KX_PYMETHOD(CValue,GetName);
272
256