At http://bzr.arbash-meinel.com/plugins/DEACTIVATED/svn/0.4.13-win32

------------------------------------------------------------
revno: 1720
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: John Arbash Meinel <[EMAIL PROTECTED]>
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.
=== 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;
+}

-- 
bazaar-commits mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits

Reply via email to