|
From: | Tom Rondeau |
Subject: | Re: [Discuss-gnuradio] py_msg_queue__delete_head |
Date: | Sun, 11 May 2014 10:17:30 -0400 |
Hi, AllI check the code in GNURadio 3.7.3, gnuradio-3.7.3/gnuradio-runtime/swig/msg_queue.ithe code:83 #ifdef SWIGPYTHON84 %inline %{85 gr::message::sptr py_msg_queue__delete_head(gr::msg_queue::sptr q) {86 gr::message::sptr msg;87 GR_PYTHON_BLOCKING_CODE(88 msg = q->delete_head();89 )90 return msg;91 }9293 void py_msg_queue__insert_tail(gr::msg_queue::sptr q, gr::message::sptr msg) {94 GR_PYTHON_BLOCKING_CODE(95 q->insert_tail(msg);96 )97 }98 %}output is located in "gnuradio-runtime/swig/runtime_swig.py"the output is like:3791 def py_msg_queue__delete_head(*args, **kwargs):3792 """py_msg_queue__delete_head(sptr q) -> sptr"""3793 return _runtime_swig.py_msg_queue__delete_head(*args, **kwargs)37943795 def py_msg_queue__insert_tail(*args, **kwargs):3796 """py_msg_queue__insert_tail(sptr q, sptr msg)"""3797 return _runtime_swig.py_msg_queue__insert_tail(*args, **kwargs)Of course, the above in the gnuradio is work well.I could not understand these swig output. so I write a small .i file to test this1 /* -*- c -*- */2 // swig2.0 -python *.i3 //swig2.0 -python -v -c++ *.i45 %module(directors="1") util_swig67 #ifdef SWIGPYTHON8910 %inline %{11 int fun1(int q) {12 return q;13 }14 %}1516 #endifbut there is one more line (see line 73 ) in the output file *.py71 def fun1(*args):72 return _util_swig.fun1(*args)73 fun1 = _util_swig.fun174 # This file is compatible with both classic and new-style classes.Is it some configuration in other place lead the output to be different from the standard "swig command" ?Thanks & Best Regards.
[Prev in Thread] | Current Thread | [Next in Thread] |