python interface not 64 bits aware
Richard Wirth <[email protected]> Tue, 1 Jun 2004 22:04:11 +0200
| Newsgroups | gmane.comp.version-control.cvs.gui.devel |
|---|---|
| Organization | Ing.Büro Richard Wirth |
| Message-ID | <[email protected]> |
Hello Python cracks!
I just discovered a problem with the python implementation when trying
the python stuff on a 64 bit environment (sparc/x86_64).
The way the pointer is passed to the python implementation is not able
to pass 64 bit pointers, but I have not enough knowledge about python
api to fix this:
void PyDoCmdUI(UCmdUI* ucmdui)
{
CPython_Interp interp;
interp.DoScriptVar("from cvsgui.MacroRegistry import *; "
"from cvsgui.CmdUI import *; "
"gMacroRegistry.DoCmdUI(CmdUI(%d), %d)", (long)ucmdui, ucmdui->m_nID);
}
here the pointer 'ucmdui' is casted to long (which is in this case 32
bit)!
On the other end 'cmdui' is parsed as an integer:
PyObject* PyCmdUI::Create(PyObject* selfptr, PyObject* args)
{
UCmdUI *cmdui;
if( !PyArg_ParseTuple(args, "i:CCmdUI", &cmdui) )
return NULL;
.....
Any hints / ideas to solve this?
--
Best regards,
Richard mailto:[email protected]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/NhFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/cvsgui-dev/
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/