[asterisk-commits] russell: branch russell/bindings r103212 - /team/russell/bindings/cdr/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Feb 9 01:20:47 CST 2008


Author: russell
Date: Sat Feb  9 01:20:43 2008
New Revision: 103212

URL: http://svn.digium.com/view/asterisk?view=rev&rev=103212
Log:
Build the swig generated code directly into asterisk to ease my dynamic linker woes

Modified:
    team/russell/bindings/cdr/Makefile
    team/russell/bindings/cdr/cdr_python.c

Modified: team/russell/bindings/cdr/Makefile
URL: http://svn.digium.com/view/asterisk/team/russell/bindings/cdr/Makefile?view=diff&rev=103212&r1=103211&r2=103212
==============================================================================
--- team/russell/bindings/cdr/Makefile (original)
+++ team/russell/bindings/cdr/Makefile Sat Feb  9 01:20:43 2008
@@ -17,4 +17,14 @@
 
 all: _all
 
+cdr_python.so: cdr_python.o python_cdr_wrap.o
+
+python_cdr_wrap.o: ASTCFLAGS+=$(PYTHON_INCLUDE)
+
+python_cdr_wrap.c: ../bindings/cdr_wrap.c
+	@cp $< $@
+
+clean::
+	rm -f python_cdr_wrap.c
+
 include $(ASTTOPDIR)/Makefile.moddir_rules

Modified: team/russell/bindings/cdr/cdr_python.c
URL: http://svn.digium.com/view/asterisk/team/russell/bindings/cdr/cdr_python.c?view=diff&rev=103212&r1=103211&r2=103212
==============================================================================
--- team/russell/bindings/cdr/cdr_python.c (original)
+++ team/russell/bindings/cdr/cdr_python.c Sat Feb  9 01:20:43 2008
@@ -63,6 +63,9 @@
 /*! \note We're going to execute all of them ... */
 #define PY_CDR_MODS_BUCKETS 1
 struct ao2_container *py_cdr_mods;
+
+/*! Comes from cdr_wrap.c */
+void init_cdr(void);
 
 static struct py_cdr_mod *unref_py_cdr_mod(struct py_cdr_mod *py_cdr_mod)
 {
@@ -297,6 +300,8 @@
 
 	main_thread_state = PyThreadState_Get();
 
+	init_cdr(); /* init cdr module from swig */
+
 	PyEval_ReleaseLock();
 
 	if (ast_cdr_register(cdr_mod_name, ast_module_info->description, python_log)) {




More information about the asterisk-commits mailing list