Re: [pygccxml-development] inline asm
Brought to you by:
mbaas,
roman_yakovenko
From: Matthias B. <mat...@gm...> - 2008-08-16 17:13:56
|
Roman Yakovenko wrote: > On Sat, Aug 16, 2008 at 11:23 AM, Thomas Rab <tho...@gm...> wrote: >> Now that I have my other problem solved.. does py++ support inline asm? > > What do you mean? Any way the answer is "no". Maybe he rather means whether *gccxml* supports inline asm. I actually don't know the answer to that but I would imagine that it supports the same syntax that gcc supports. Seeing that the posted code has a #ifdef WIN32, it looks like those assembler statements might only be understood by the Microsoft compiler. If this is the problem then it's similar to a problem I once had on OSX where some system headers use code in some inline functions that is specific to Apple's version of gcc. Of course, gccxml didn't understand those things and issued an error. My workaround to this problem was to create local copies of those system headers and remove the function bodies. I could then use those copies when running gccxml and use the original headers when compiling the code. It's a bit awkward, but it works. >> NX_INLINE void NxMath::sinCos(NxF32 f, NxF32& s, NxF32& c) >> { >> #ifdef WIN32 >> NxF32 localCos, localSin; >> NxF32 local = f; >> _asm fld local >> _asm fsincos >> _asm fstp localCos >> _asm fstp localSin >> c = localCos; >> s = localSin; >> #else >> c = cosf(f); >> s = sinf(f); >> #endif >> } >> It's from the PhysX sdk :P >> This function is in a different header than I'm trying to bind, so this may >> be my issue. How do I exclude a member function if it's in a different >> header than I'm binding? It doesn't matter in which header a function is declared (unless you explicitly restrict a query to certain headers). >> I tried doing it just the way I normally would: >> foo = mb.member_function("foo") >> foo.exclude() >> That didn't work. I also tried specifying the class: >> bar = mb.class_("bar") >> foo = bar.member_function("foo") >> foo.exclude() Is the NxMath class inside a namespace? Then you would have to search that namespace instead of the root namespace (or use the recursive flag). >> But that didn't work either. -Tom What do you mean by "it didn't work"? Did it produce an error message? If so, what was that error? Or did everything run fine but your Python module just contained more stuff than you wanted? As Roman said, you should be more specific as to what the actual problem is (it might also help knowing if you are actually on Windows or not (or if you did define WIN32 yourself)). - Matthias - |