|
Python and std::vector<unsigned long>: msg#00093programming.swig
Hello, why is the template specialization of std::vector<unsigned long> done with PyInt_* functions? If you use an unsigned long, you normally expect that the value might be greater than the greatest signed long. In case of such big integers you have then negative integers if you use PyInt. The disadvantage of PyLong is the size increase and I suppose slower computation. Does anyone now how to use PyInt and interpret them as unsigned in Python? namespace std { specialize_std_vector(unsigned long,PyInt_Check, \ PyInt_AsLong,PyInt_FromLong); } Ciao _______________________________________________ Swig maillist - Swig@xxxxxxxxxxxxxxx http://mailman.cs.uchicago.edu/mailman/listinfo/swig |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | python "named arguments" swig: 00093, Sebastian Haase |
|---|---|
| Next by Date: | Re: Python and std::vector<unsigned long>: 00093, Luigi Ballabio |
| Previous by Thread: | python "named arguments" swigi: 00093, Sebastian Haase |
| Next by Thread: | Re: Python and std::vector<unsigned long>: 00093, Luigi Ballabio |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |