ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> pyxpcom
pyxpcom
[pyxpcom] int array in pyxpcom
by Jiangweiran other posts by this author
Dec 5 2007 1:56AM messages near this date
view in the new Beta List Site
Re: [pyxpcom] xulrunner trunk, build error in PyIInterfaceInfo.cpp | Re: [pyxpcom] What changed in PyXPCOM component registration in 1.9?
Hello all:

I have a idl which defines following function:
//get the user font info
   void getUserFontInfo(out PRUint32 defaultFontIndex, out PRUint32 fontCount, out PRUint32 
arrayLen, [array,size_is(array    Len)] out PRInt16 userFonts);

in this function,the userFonts is corresponding to one int array,I return the array's pointe
r to outside throught pyxpcom,and the python can get all the array element(very cool),but af
ter I del the variable referring the userFonts, it seems the inside c++ int array is also be
ing freed,which leads to the core dumped.is this a design problem for idl?

I now do a memcpy in getUserFontInfo implementation(C++),and return the copied array to pyth
on,now everyone is happy,is this ok?

thanks all.

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved