Changeset 198 for trunk/python2
- Timestamp:
- 05/31/10 15:20:34 (14 years ago)
- Location:
- trunk/python2
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python2/SConstruct
r196 r198 28 28 29 29 nenv.config = config 30 nenv.Append(CFLAGS = "-I../include/ -Iinclude") 30 if config.DEBUG: 31 nenv.Append(CFLAGS = "-ggdb -pedantic -Wall -std=gnu99") 32 nenv.Append(CPPPATH=['../include', 'include']) 33 nenv.python_cppflags = '-I/usr/include/python2.5_d' 34 else: 35 nenv.Append(CFLAGS = "-ggdb -pedantic -Wall") 36 nenv.Append(CPPPATH=['../include', 'include']) 37 31 38 nenv.Append(LIBPATH="../lib") 32 39 nenv.Append(LINKFLAGS="") -
trunk/python2/class_parser.py
r196 r198 20 20 self.classes = {} 21 21 self.headers = '#include <Python.h>\n' 22 22 23 self.files = [] 23 24 … … 41 42 def initialization(self): 42 43 result = self.init_string + """ 43 talloc_set_log_fn((void *)printf);44 talloc_set_log_fn((void(*)(const char*))printf); 44 45 //talloc_enable_leak_report(); 45 46 """ … … 119 120 Py_INCREF(Py_None); 120 121 return (Gen_wrapper *)Py_None; 121 } ;122 } 122 123 123 124 // Search for subclasses … … 128 129 129 130 result = (Gen_wrapper *)_PyObject_New(python_wrappers[i].python_type); 130 result->ctx = talloc_asprintf(NULL, "new_class_wrapper %%s@%%p", NAMEOF(item), item); 131 result->ctx = talloc_asprintf(NULL, "new_class_wrapper %%s@%%p", 132 NAMEOF(item), (void*)item); 131 133 result->base = (void *)item; 132 134 … … 138 140 139 141 return result; 140 } ;141 } ;142 } ;142 } 143 } 144 } 143 145 144 146 PyErr_Format(PyExc_RuntimeError, "Unable to find a wrapper for object %%s", NAMEOF(item)); 145 147 return NULL; 146 } ;148 } 147 149 148 150 static PyObject *resolve_exception(char **error_buff) { … … 160 162 return PyExc_RuntimeError; 161 163 }; 162 } ;164 } 163 165 164 166 static int type_check(PyObject *obj, PyTypeObject *type) { … … 169 171 for(tmp = obj->ob_type; tmp && tmp != &PyBaseObject_Type; tmp = tmp->tp_base) { 170 172 if(tmp == type) return 1; 171 } ;173 } 172 174 173 175 return 0; 174 } ;176 } 175 177 176 178 static int check_error() { … … 182 184 ClearError(); 183 185 return 1; 184 } ;186 } 185 187 return 0; 186 } ;188 } 187 189 188 190 #define CHECK_ERROR if(check_error()) goto error; … … 376 378 377 379 result = """PyErr_Clear(); 378 if(!%(name)s) { PyErr_Format(PyExc_RuntimeError, "%(name)s is NULL"); goto error; } ;380 if(!%(name)s) { PyErr_Format(PyExc_RuntimeError, "%(name)s is NULL"); goto error; } 379 381 %(result)s = PyString_FromStringAndSize((char *)%(name)s, %(length)s);\nif(!%(result)s) goto error; 380 382 """ % dict(name=name, result=result,length=self.length) … … 398 400 memcpy(%(destination)s, buff, length); 399 401 %(destination)s[length]=0; 400 } ;402 } 401 403 """ % dict(source = source, destination = destination, context =context) 402 404 … … 495 497 %(result)s = PyString_FromStringAndSize(str_%(name)s, 1); 496 498 if(!%(result)s) goto error; 497 } ;499 } 498 500 """ % dict(result=result, name = name or self.name) 499 501 … … 513 515 "You must only provide a single character for arg %(name)r"); 514 516 goto error; 515 } ;517 } 516 518 517 519 %(name)s = str_%(name)s[0]; … … 579 581 return """if(func_return > %(length)s) { 580 582 func_return = 0; 581 } ;583 } 582 584 583 585 _PyString_Resize(&tmp_%(name)s, func_return); \n%(result)s = tmp_%(name)s;\n""" % \ … … 594 596 Py_DECREF(%(result)s); 595 597 %(result)s = PyLong_FromLong(tmp_len); 596 } ;598 } 597 599 """ % dict(result = result, name=self.name) 598 600 … … 631 633 if(-1==PyString_AsStringAndSize(%(source)s, &buf, &tmp)) { 632 634 goto error; 633 } ;635 } 634 636 635 637 // Take a copy of the python string … … 698 700 PyErr_Format(PyExc_ValueError, "%(destination)s must be a sequence"); 699 701 goto error; 700 } ;702 } 701 703 702 704 size = PySequence_Size(%(source)s); 703 } ;705 } 704 706 705 707 %(destination)s = talloc_zero_array(NULL, char *, size + 1); … … 712 714 Py_DECREF(tmp); 713 715 goto error; 714 } ;716 } 715 717 Py_DECREF(tmp); 716 } ;717 718 } ;""" % dict(source = source, destination = destination, context = context)718 } 719 720 }""" % dict(source = source, destination = destination, context = context) 719 721 720 722 def pre_call(self, method): … … 735 737 PyErr_Format(PyExc_RuntimeError, "function must return an %(type)s instance"); 736 738 goto error; 737 } ;739 } 738 740 739 741 %(destination)s = ((Gen_wrapper *)%(source)s)->base; … … 768 770 } else { 769 771 call_%(name)s = %(name)s->base; 770 } ;\n""" % self.__dict__772 }\n""" % self.__dict__ 771 773 772 774 def assign(self, call, method, target=None): … … 810 812 result += " talloc_reference(%(name)s->ctx, %(name)s->base);\n" % args 811 813 812 result += """ } ;814 result += """ } 813 815 } 814 816 """ … … 850 852 } else { 851 853 call_%(name)s = (%(type)s *)&%(name)s->base; 852 } ;\n""" % self.__dict__854 }\n""" % self.__dict__ 853 855 854 856 class StructWrapper(Wrapper): … … 864 866 865 867 if "NULL_OK" in self.attributes: 866 result += "if(!%(name)s->base) { Py_DECREF(%(name)s); return NULL; } ;" % args868 result += "if(!%(name)s->base) { Py_DECREF(%(name)s); return NULL; }" % args 867 869 868 870 result += """ … … 999 1001 def write(self, out): 1000 1002 out.write("\n//Handle exceptions\n") 1001 out.write("if(%s) {\n PyErr_Format(PyExc_%s, %s);\n goto error; \n} ;\n\n" % (1003 out.write("if(%s) {\n PyErr_Format(PyExc_%s, %s);\n goto error; \n}\n\n" % ( 1002 1004 self.check, self.exception, self.message)) 1003 1005 … … 1153 1155 PyErr_Format(PyExc_RuntimeError, "%(class_name)s.%(method)s is not implemented"); 1154 1156 goto error; 1155 } ;1156 } ;1157 } 1158 } 1157 1159 """ % dict(def_class_name = self.definition_class_name, method=self.name, 1158 1160 class_name = self.class_name)) … … 1208 1210 out.write("error:\n " + self.error_condition()); 1209 1211 1210 out.write("\n} ;\n\n")1212 out.write("\n}\n\n") 1211 1213 1212 1214 def add_arg(self, type, name): … … 1314 1316 ((%(class_name)s)self->base)->%(method)s((%(class_name)s)self->base); 1315 1317 return PyObject_SelfIter((PyObject *)self); 1316 } ;1318 } 1317 1319 """ % args) 1318 1320 … … 1335 1337 talloc_free(self->ctx); 1336 1338 self->base=NULL; 1337 } ;1339 } 1338 1340 """ 1339 1341 out.write("""static void … … 1341 1343 %(free)s 1342 1344 PyObject_Del(self); 1343 } ;\n1345 }\n 1344 1346 """ % dict(class_name = self.class_name, free=free)) 1345 1347 … … 1379 1381 PyErr_Format(PyExc_IOError, "Unable to construct class %s"); 1380 1382 goto error; 1381 } ;1383 } 1382 1384 """ % (tmp, self.class_name)) 1383 1385 … … 1388 1390 out.write("error:\n " + self.error_condition()); 1389 1391 1390 out.write("\n} ;\n\n")1392 out.write("\n}\n\n") 1391 1393 1392 1394 class GetattrMethod(Method): … … 1463 1465 tmp = PyString_FromString(i->ml_name); 1464 1466 PyList_Append(result, tmp); Py_DECREF(tmp); 1465 } ;""" % self.class_name)1467 }""" % self.class_name) 1466 1468 1467 1469 out.write(""" … … 1504 1506 %(python_obj)s 1505 1507 return py_result; 1506 } ;""" % dict(name = attr.name, python_obj = attr.to_python_object(),1508 }""" % dict(name = attr.name, python_obj = attr.to_python_object(), 1507 1509 python_assign = attr.assign(call, self), 1508 1510 python_def = attr.definition(sense='out'))) … … 1543 1545 tmp = PyString_FromString(i->ml_name); 1544 1546 PyList_Append(result, tmp); Py_DECREF(tmp); 1545 } ;""" % self.class_name)1547 } """ % self.class_name) 1546 1548 1547 1549 out.write(""" … … 1552 1554 PyObject *result = PyObject_GetAttrString(self->base->proxied, name); 1553 1555 if(result) return result; 1554 } ;""")1556 } """) 1555 1557 1556 1558 class ProxiedMethod(Method): … … 1615 1617 sense='proxied', BORROWED=True)) 1616 1618 1617 out.write('if(!((%s)self)->proxied) {\n RaiseError(ERuntimeError, "No proxied object in %s"); goto error;\n} ;\n' % (self.myclass.class_name, self.myclass.class_name))1619 out.write('if(!((%s)self)->proxied) {\n RaiseError(ERuntimeError, "No proxied object in %s"); goto error;\n}\n' % (self.myclass.class_name, self.myclass.class_name)) 1618 1620 1619 1621 out.write("\n//Now call the method\n") … … 1645 1647 error_str[BUFF_SIZE-1]=0; 1646 1648 *error_type = ERuntimeError; 1647 } ;1649 } 1648 1650 Py_DECREF(str); 1649 1651 goto error; 1650 } ;1652 } 1651 1653 1652 1654 """); … … 1658 1660 out.write(self.return_type.from_python_object('py_result',self.return_type.name, self, context = "self")) 1659 1661 1660 out.write("if(py_result) { Py_DECREF(py_result);} ;\nPy_DECREF(method_name);\n\n");1662 out.write("if(py_result) { Py_DECREF(py_result);}\nPy_DECREF(method_name);\n\n"); 1661 1663 out.write("PyGILState_Release(gstate);\n") 1662 1664 1663 1665 ## Decref all our python objects: 1664 1666 for arg in self.args: 1665 out.write("if(py_%s) { Py_DECREF(py_%s);} ;\n" %( arg.name, arg.name))1667 out.write("if(py_%s) { Py_DECREF(py_%s);}\n" %( arg.name, arg.name)) 1666 1668 1667 1669 out.write(self.return_type.return_value('func_return')) 1668 1670 if self.error_set: 1669 1671 out.write("\nerror:\n") 1670 out.write("if(py_result) { Py_DECREF(py_result);} ;\nPy_DECREF(method_name);\n\n");1672 out.write("if(py_result) { Py_DECREF(py_result);}\nPy_DECREF(method_name);\n\n"); 1671 1673 ## Decref all our python objects: 1672 1674 for arg in self.args: 1673 out.write("if(py_%s) { Py_DECREF(py_%s);} ;\n" % (arg.name, arg.name))1675 out.write("if(py_%s) { Py_DECREF(py_%s);}\n" % (arg.name, arg.name)) 1674 1676 1675 1677 out.write("PyGILState_Release(gstate);\n %s;\n" % self.error_condition()) 1676 1678 1677 out.write(" } ;\n};\n")1679 out.write(" }\n}\n") 1678 1680 1679 1681 def error_condition(self): … … 1688 1690 out.write("\nself->ctx = talloc_strdup(NULL, \"%s\");" % self.class_name) 1689 1691 out.write("\nself->base = talloc(self->ctx, %s);\n" % self.class_name) 1690 out.write(" return 0;\n} ;\n\n")1692 out.write(" return 0;\n}\n\n") 1691 1693 1692 1694 def write_destructor(self, out): … … 1694 1696 %(class_name)s_dealloc(py%(class_name)s *self) { 1695 1697 talloc_free(self->ctx); 1696 } ;\n1698 }\n 1697 1699 """ % dict(class_name = self.class_name)) 1698 1700 … … 1706 1708 talloc_free(self->ctx); 1707 1709 self->base = NULL; 1708 } ;1709 } ;\n1710 } 1711 }\n 1710 1712 1711 1713 static int %(class_name)s_destructor(void *this) { … … 1713 1715 Py_DECREF(self->base->proxied); 1714 1716 return 0; 1715 } ;1717 } 1716 1718 """ % dict(class_name = self.class_name)) 1717 1719 … … 1730 1732 ((%(definition_class_name)s)self->base)->%(name)s = tmp; 1731 1733 Py_DECREF(py_result); 1732 } ;1734 } 1733 1735 PyErr_Clear(); 1734 } ;""" % dict(definition = attribute.definition(), name=attribute.name,1736 }""" % dict(definition = attribute.definition(), name=attribute.name, 1735 1737 attribute_name = attribute.__class__.__name__, 1736 1738 type = attribute.type, … … 1760 1762 BORROWED=True)) 1761 1763 1762 out.write('if(!((%s)self)->proxied) {\n RaiseError(ERuntimeError, "No proxied object in %s"); goto error;\n} ;\n' % (self.myclass.class_name, self.myclass.class_name))1764 out.write('if(!((%s)self)->proxied) {\n RaiseError(ERuntimeError, "No proxied object in %s"); goto error;\n}\n' % (self.myclass.class_name, self.myclass.class_name)) 1763 1765 1764 1766 out.write(""" … … 1782 1784 PyErr_Clear(); 1783 1785 py_result = PyObject_CallFunctionObjArgs(((%(name)s)self)->proxied, %(call)s); 1784 } ;1786 } 1785 1787 1786 1788 /** Check for python errors */ … … 1802 1804 error_str[BUFF_SIZE-1]=0; 1803 1805 *error_type = ERuntimeError; 1804 } ;1806 } 1805 1807 Py_DECREF(str); 1806 1808 goto error; 1807 } ;1809 } 1808 1810 1809 1811 // Take over the proxied object now … … 1825 1827 "((%s)self)->%s" % (class_name, attr.name), 1826 1828 self)) 1827 out.write("}\nPy_DECREF(py_result);\n} ;\n};\n")1829 out.write("}\nPy_DECREF(py_result);\n}\n}\n") 1828 1830 1829 1831 out.write("PyGILState_Release(gstate);\n") … … 1832 1834 out.write("error:\n PyGILState_Release(gstate);\ntalloc_free(self); return NULL;\n") 1833 1835 1834 out.write("} ;\n\n")1836 out.write("}\n\n") 1835 1837 1836 1838 def write_definition(self, out): … … 1881 1883 if(1 || PyDict_GetItemString(proxied->ob_type->tp_dict, "%(name)s")) { 1882 1884 ((%(definition_class_name)s)self->base)->%(name)s = py%(class_name)s_%(name)s; 1883 } ;1885 } 1884 1886 """ % dict(definition_class_name = method.definition_class_name, 1885 1887 name = method.name, … … 1899 1901 out.write("error:\n PyGILState_Release(gstate);\n " + self.error_condition()); 1900 1902 1901 out.write("\n} ;\n\n")1903 out.write("\n}\n\n") 1902 1904 1903 1905 class EmptyConstructor(ConstructorMethod): 1904 1906 def write_definition(self, out): 1905 1907 out.write("""static int py%(class_name)s_init(py%(class_name)s *self, PyObject *args, PyObject *kwds) {\n""" % dict(method = self.name, class_name = self.class_name)) 1906 out.write("""return 0;} ;\n\n""")1908 out.write("""return 0;}\n\n""") 1907 1909 1908 1910 class ClassGenerator: … … 2035 2037 { 2036 2038 return v->base != 0; 2037 } ;2039 } 2038 2040 """ % self.__dict__ 2039 2041 … … 2524 2526 Py_DECREF(self->value); 2525 2527 PyObject_Del(self); 2526 } ;\n2528 }\n 2527 2529 """ % dict(class_name = self.class_name)) 2528 2530 def write_definition(self, out): … … 2540 2542 error: 2541 2543 return -1; 2542 } ;2544 } 2543 2545 2544 2546 static PyObject *py%(class_name)s___str__(py%(class_name)s *self) { … … 2549 2551 } else { 2550 2552 result = PyObject_Str(self->value); 2551 } ;2553 } 2552 2554 2553 2555 return result; 2554 } ;2556 } 2555 2557 2556 2558 """ % self.__dict__) … … 2599 2601 Py_INCREF(self->value); 2600 2602 return self->value; 2601 } ;2603 } 2602 2604 """ % self.__dict__ 2603 2605 … … 2648 2650 PyErr_Format(PyExc_RuntimeError, "value %%lu is not valid for Enum %(type)s of arg '%(name)s'", (unsigned long)%(name)s); 2649 2651 goto error; 2650 } ;2652 } 2651 2653 Py_DECREF(tmp); 2652 } ;2654 } 2653 2655 """ % self.__dict__ 2654 2656 -
trunk/python2/config.py
r196 r198 1 1 MINGW_XCOMPILE = False 2 2 V = True 3 4 DEBUG = True -
trunk/python2/include/class.h
r196 r198 190 190 191 191 192 #include "talloc.h"192 #include <talloc.h> 193 193 194 194 #define CLASS(class,super_class) \ … … 250 250 ((Object)self)->__doc__ = string 251 251 252 #define END_VIRTUAL return 1; } ;252 #define END_VIRTUAL return 1; } 253 253 254 254 #define VMETHOD(method) \ … … 366 366 ((Object)obj)->__class__ 367 367 368 inlinevoid Object_init(Object);368 void Object_init(Object); 369 369 370 370 extern struct Object_t __Object; -
trunk/python2/regfi/class.c
r196 r198 33 33 // allocated therefore: 34 34 35 inlinevoid Object_init(Object this) {35 void Object_init(Object this) { 36 36 this->__class__ = &__Object; 37 37 this->__super__ = NULL; 38 } ;38 } 39 39 40 40 struct Object_t __Object = { … … 56 56 return 0; 57 57 }; 58 } ;58 } 59 59 60 60 void unimplemented(Object self) { 61 61 printf("%s contains unimplemented functions.. is it an abstract class?\n", NAMEOF(self)); 62 62 abort(); 63 } ;63 } -
trunk/python2/regfi/error.c
r196 r198 22 22 void error_dest(void *slot) { 23 23 if(slot) talloc_free(slot); 24 } ;24 } 25 25 26 26 void *raise_errors(enum _error_type t, char *reason, ...) { … … 42 42 43 43 return NULL; 44 } ;44 } 45 45 46 46 static int error_subsystem_initialised=0; … … 70 70 71 71 return type; 72 } ;72 } 73 73 74 74 /** Initialise the error subsystem */ … … 82 82 abort(); 83 83 }; 84 } ;84 } -
trunk/python2/regfi/pyregfi.h
r196 r198 19 19 struct ValueIterator_t; 20 20 21 BIND_STRUCT(REGFI_NK_REC) ;22 BIND_STRUCT(REGFI_VK_REC) ;23 BIND_STRUCT(REGFI_DATA) ;21 BIND_STRUCT(REGFI_NK_REC) 22 BIND_STRUCT(REGFI_VK_REC) 23 BIND_STRUCT(REGFI_DATA) 24 24 25 25 /** This is the base class for data objects */ 26 26 CLASS(RawData, Object) 27 REGFI_DATA *data;28 REGFI_VK_REC *rec;27 const REGFI_DATA *data; 28 const REGFI_VK_REC *rec; 29 29 30 RawData METHOD(RawData, Con, REGFI_DATA *data, REGFI_VK_REC *record);30 RawData METHOD(RawData, Con, REGFI_DATA *data, REGFI_VK_REC *record); 31 31 32 32 /** Return the raw buffer as a string. By default we only return -
trunk/python2/regfi/regfi.c
r196 r198 18 18 19 19 return 0; 20 } ;20 } 21 21 22 22 static RegistryFile RegistryFile_Con(RegistryFile self, char *filename) { … … 25 25 RaiseError(EIOError, "Unable to open %s", filename); 26 26 goto error; 27 } ;27 } 28 28 29 29 self->reg = regfi_alloc(self->fd); 30 30 31 31 if(!self->reg) { 32 RaiseError(ERuntimeError, "REGFI Error: %s", regfi_log_get_str()); 33 goto error; 34 }; 32 /*RaiseError(ERuntimeError, "REGFI Error: %s", regfi_log_get_str());*/ 33 /*char* e = regfi_log_get_str();*/ 34 /*fprintf(stderr, "%p\n", e);*/ 35 goto error; 36 } 35 37 36 38 talloc_set_destructor((void *)self, RegistryFile_dest); … … 40 42 talloc_free(self); 41 43 return NULL; 42 } ;44 } 43 45 44 46 static KeyIterator RegistryFile_get_key(RegistryFile self, char **path, REGFI_ENCODING encoding) { 45 47 return CONSTRUCT(KeyIterator, KeyIterator, Con, NULL, self, path, encoding); 46 } ;48 } 47 49 48 50 … … 58 60 if(this->next_item) { 59 61 regfi_free_record(this->next_item); 60 } ;61 62 return 0; 63 } ;62 } 63 64 return 0; 65 } 64 66 65 67 static KeyIterator KeyIterator_Con(KeyIterator self, RegistryFile file, char **path, … … 70 72 RaiseError(ERuntimeError, "Error: %s", regfi_log_get_str()); 71 73 goto error; 72 } ;74 } 73 75 74 76 talloc_set_destructor((void*)self, KeyIterator_dest); … … 79 81 RaiseError(ERuntimeError, "Unable to walk down key path"); 80 82 goto error; 81 } ;82 } ;83 } 84 } 83 85 84 86 // Get the first key in the list … … 88 90 error: 89 91 return NULL; 90 } ;92 } 91 93 92 94 static void KeyIterator__iter__(KeyIterator self) { … … 96 98 97 99 self->next_item = regfi_iterator_first_subkey(self->iter); 98 } ;99 100 static REGFI_NK_REC *KeyIterator_next(KeyIterator self) {101 const REGFI_NK_REC 100 } 101 102 static const REGFI_NK_REC* KeyIterator_next(KeyIterator self) { 103 const REGFI_NK_REC* result; 102 104 103 105 if(!self->next_item) return NULL; … … 108 110 109 111 return result; 110 } ;112 } 111 113 112 114 static ValueIterator KeyIterator_list_values(KeyIterator self) { 113 115 return CONSTRUCT(ValueIterator, ValueIterator, Con, NULL, self); 114 } ;116 } 115 117 116 118 VIRTUAL(KeyIterator, Object) { … … 127 129 128 130 return 0; 129 } ;131 } 130 132 131 133 static ValueIterator ValueIterator_Con(ValueIterator self, KeyIterator key) { … … 139 141 140 142 return self; 141 } ;143 } 142 144 143 145 static void ValueIterator__iter__(ValueIterator self) { … … 145 147 146 148 self->next_item = regfi_iterator_first_value(self->iter); 147 } ;149 } 148 150 149 151 static RawData ValueIterator_iternext(ValueIterator self) { 150 152 RawData result; 151 REGFI_DATA *data;152 REGFI_VK_REC *rec = (REGFI_VK_REC *)self->next_item;153 const REGFI_DATA *data; 154 const REGFI_VK_REC *rec = self->next_item; 153 155 154 156 if(!rec) return NULL; … … 158 160 RaiseError(ERuntimeError, "Unable to fetch data: %s", regfi_log_get_str()); 159 161 goto error; 160 } ;162 } 161 163 162 164 switch(self->next_item->type) { … … 174 176 result = (RawData)CONSTRUCT(RawData, RawData, Con, NULL, data, rec); 175 177 break; 176 } ;178 } 177 179 178 180 … … 188 190 talloc_free(self); 189 191 return NULL; 190 } ;192 } 191 193 192 194 VIRTUAL(ValueIterator, Object) { … … 208 210 209 211 return 0; 210 } ;212 } 211 213 212 214 static RawData RawData_Con(RawData self, REGFI_DATA *data, REGFI_VK_REC *record) { … … 217 219 218 220 return self; 219 } ;221 } 220 222 221 223 static int RawData_get_value(RawData self, char *buff, int len) { … … 225 227 226 228 return available_to_read; 227 } ;229 } 228 230 229 231 VIRTUAL(RawData, Object) { … … 232 234 } END_VIRTUAL 233 235 234 static char *DataString_get_value(DataString self) {236 static char* DataString_get_value(DataString self) { 235 237 RawData this = (RawData)self; 236 238 237 return this->data->interpreted.string;238 } ;239 return (char*)this->data->interpreted.string; 240 } 239 241 240 242 VIRTUAL(DataString, RawData) { … … 246 248 247 249 return this->data->interpreted.dword; 248 } ;250 } 249 251 250 252 VIRTUAL(DWORDData, RawData) { … … 255 257 INIT_CLASS(RegistryFile); 256 258 257 } ;259 } -
trunk/python2/utils.py
r196 r198 289 289 sysconfig.get_config_var('SO')) 290 290 shlib_post_action = None 291 cppflags = distutils.util.split_quoted( 292 "-I"+sysconfig.get_python_inc()) 291 cppflags = distutils.util.split_quoted(self.python_cppflags) 293 292 shlink_flags = str(self['LINKFLAGS']).split() 294 293
Note: See TracChangeset
for help on using the changeset viewer.