Rev 1720: We can't point directly at dll imported functions. in http://bzr.arbash-meinel.com/plugins/DEACTIVATED/svn/0.4.13-win32
John Arbash Meinel
john at arbash-meinel.com
Thu Oct 30 19:12:20 GMT 2008
At http://bzr.arbash-meinel.com/plugins/DEACTIVATED/svn/0.4.13-win32
------------------------------------------------------------
revno: 1720
revision-id: john at arbash-meinel.com-20081030191211-3jxp7vj5lx1makmz
parent: jelmer at samba.org-20080924160103-8eaf0uaujrsnz7he
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 0.4.13-win32
timestamp: Thu 2008-10-30 14:12:11 -0500
message:
We can't point directly at dll imported functions.
So instead, create an 'initeditor()' function which initializes those
members, and then call it when the module is loaded.
-------------- next part --------------
=== modified file 'client.c'
--- a/client.c 2008-08-31 13:29:41 +0000
+++ b/client.c 2008-10-30 19:12:11 +0000
@@ -801,6 +801,8 @@
void initclient(void)
{
+ extern void initeditor(void);
+
PyObject *mod;
if (PyType_Ready(&Client_Type) < 0)
@@ -812,6 +814,8 @@
if (PyType_Ready(&ConfigItem_Type) < 0)
return;
+ initeditor();
+
/* Make sure APR is initialized */
apr_initialize();
=== modified file 'editor.c'
--- a/editor.c 2008-08-21 01:16:39 +0000
+++ b/editor.c 2008-10-30 19:12:11 +0000
@@ -137,7 +137,7 @@
/* Methods to implement standard operations */
- (destructor)PyObject_Del, /* destructor tp_dealloc; */
+ NULL, // done in initeditor() (destructor)PyObject_Del, /* destructor tp_dealloc; */
NULL, /* printfunc tp_print; */
NULL, /* getattrfunc tp_getattr; */
NULL, /* setattrfunc tp_setattr; */
@@ -235,7 +235,7 @@
/* Methods to implement standard operations */
- (destructor)PyObject_Del, /* destructor tp_dealloc; */
+ NULL, // Done in initeditor() (destructor)PyObject_Del, /* destructor tp_dealloc; */
NULL, /* printfunc tp_print; */
NULL, /* getattrfunc tp_getattr; */
NULL, /* setattrfunc tp_setattr; */
@@ -492,7 +492,7 @@
/* Methods to implement standard operations */
- (destructor)PyObject_Del, /* destructor tp_dealloc; */
+ NULL, // Done in initeditor() (destructor)PyObject_Del, /* destructor tp_dealloc; */
NULL, /* printfunc tp_print; */
NULL, /* getattrfunc tp_getattr; */
NULL, /* setattrfunc tp_setattr; */
@@ -688,3 +688,9 @@
};
+void initeditor(void)
+{
+ TxDeltaWindowHandler_Type.tp_dealloc = (destructor)PyObject_Del;
+ FileEditor_Type.tp_dealloc = (destructor)PyObject_Del;
+ DirectoryEditor_Type.tp_dealloc = (destructor)PyObject_Del;
+}
More information about the bazaar-commits
mailing list