LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 11-12-2004, 05:10 PM   #1
The_Nerd
Member
 
Registered: Aug 2002
Distribution: Debian
Posts: 535

Rep: Reputation: 31
Advanced macro techniques


I need to do this:

Code:
#define FUCTION_WRAP(Name, FormatString, args...) \
SCRIPT_DEF(Name) \
{ \
    args[0]; \
    args[1]; \
    args[(n)]; \
    if (!PyArg_ParseTuple(PyArgs, FormatString, &args_x[0], &args_x[1], &args_x[(n)])) return NULL; \
    Py_BuildValue("i", Name(&args_x[0], &args_x[1], &args_x[(n)]));
} \
Where I call:
Code:
FUCTION_WRAP(glVertex3f, "fff", GLdouble x, GLdouble y, GLdouble z)
And it strips GLdouble from args_x*

How? Is it possible?

Edit: Is it even possible to get a certain argument from __VA_ARGS__, or does it always just copy over everything?

Last edited by The_Nerd; 11-12-2004 at 05:30 PM.
 
Old 11-15-2004, 03:21 PM   #2
The_Nerd
Member
 
Registered: Aug 2002
Distribution: Debian
Posts: 535

Original Poster
Rep: Reputation: 31
Never mind. I figured out my delema.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
nmap scanning techniques metallica1973 Linux - Security 4 10-24-2005 10:16 PM
Data hiding techniques npuetz Linux - General 4 06-24-2005 01:06 PM
#defining a macro inside a macro? saravkrish Programming 1 05-24-2005 09:48 PM
space saving techniques? c_olin3404 Linux - General 2 03-22-2005 04:31 PM
Some techniques for text file editing ganninu Programming 17 10-09-2003 05:34 PM


All times are GMT -5. The time now is 02:51 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration