[Freeswitch-svn] [commit] r3289 - in freeswitch/trunk/src/mod/languages: mod_perl mod_php mod_python

Freeswitch SVN anthm at freeswitch.org
Thu Nov 9 00:34:42 EST 2006


Author: anthm
Date: Thu Nov  9 00:34:42 2006
New Revision: 3289

Modified:
   freeswitch/trunk/src/mod/languages/mod_perl/fs_perl.pm
   freeswitch/trunk/src/mod/languages/mod_php/freeswitch.php
   freeswitch/trunk/src/mod/languages/mod_php/php_freeswitch.h
   freeswitch/trunk/src/mod/languages/mod_python/freeswitch.py

Log:
swig stuff

Modified: freeswitch/trunk/src/mod/languages/mod_perl/fs_perl.pm
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_perl/fs_perl.pm	(original)
+++ freeswitch/trunk/src/mod/languages/mod_perl/fs_perl.pm	Thu Nov  9 00:34:42 2006
@@ -1,5 +1,4 @@
-# This file was created automatically by SWIG 1.3.29.
-# Don't modify this file, modify the SWIG interface instead.
+# This file was automatically generated by SWIG
 package fs_perl;
 require Exporter;
 require DynaLoader;

Modified: freeswitch/trunk/src/mod/languages/mod_php/freeswitch.php
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_php/freeswitch.php	(original)
+++ freeswitch/trunk/src/mod/languages/mod_php/freeswitch.php	Thu Nov  9 00:34:42 2006
@@ -2,7 +2,7 @@
 
 /* ----------------------------------------------------------------------------
  * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.29
+ * Version 1.3.21
  * 
  * This file is not intended to be easily readable and contains a number of 
  * coding conventions designed to improve portability and efficiency. Do not make
@@ -16,7 +16,7 @@
 
 /* if our extension has not been loaded, do what we can */
 if (!extension_loaded("php_freeswitch")) {
-  if (!dl("php_freeswitch.so")) return;
+	if (!dl("php_freeswitch.so")) return;
 }
 
 

Modified: freeswitch/trunk/src/mod/languages/mod_php/php_freeswitch.h
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_php/php_freeswitch.h	(original)
+++ freeswitch/trunk/src/mod/languages/mod_php/php_freeswitch.h	Thu Nov  9 00:34:42 2006
@@ -1,6 +1,6 @@
 /* ----------------------------------------------------------------------------
  * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.29
+ * Version 1.3.21
  * 
  * This file is not intended to be easily readable and contains a number of 
  * coding conventions designed to improve portability and efficiency. Do not make
@@ -40,10 +40,6 @@
 # define PHP_FREESWITCH_API
 #endif
 
-#ifdef ZTS
-#include "TSRM.h"
-#endif
-
 PHP_MINIT_FUNCTION(freeswitch);
 PHP_MSHUTDOWN_FUNCTION(freeswitch);
 PHP_RINIT_FUNCTION(freeswitch);
@@ -76,4 +72,24 @@
 ZEND_NAMED_FUNCTION(_wrap_fs_switch_ivr_speak_text);
 ZEND_NAMED_FUNCTION(_wrap_fs_switch_channel_get_variable);
 ZEND_NAMED_FUNCTION(_wrap_fs_switch_channel_set_variable);
+/*If you declare any globals in php_freeswitch.h uncomment this:
+ZEND_BEGIN_MODULE_GLOBALS(freeswitch)
+ZEND_END_MODULE_GLOBALS(freeswitch)
+*/
+#ifdef ZTS
+#define FREESWITCH_D  zend_freeswitch_globals *freeswitch_globals
+#define FREESWITCH_DC  , FREESWITCH_D
+#define FREESWITCH_C  freeswitch_globals
+#define FREESWITCH_CC  , FREESWITCH_C
+#define FREESWITCH_SG(v)  (freeswitch_globals->v)
+#define FREESWITCH_FETCH()  zend_freeswitch_globals *freeswitch_globals = ts_resource(freeswitch_globals_id)
+#else
+#define FREESWITCH_D
+#define FREESWITCH_DC
+#define FREESWITCH_C
+#define FREESWITCH_CC
+#define FREESWITCH_SG(v)  (freeswitch_globals.v)
+#define FREESWITCH_FETCH()
+#endif
+
 #endif /* PHP_FREESWITCH_H */

Modified: freeswitch/trunk/src/mod/languages/mod_python/freeswitch.py
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_python/freeswitch.py	(original)
+++ freeswitch/trunk/src/mod/languages/mod_python/freeswitch.py	Thu Nov  9 00:34:42 2006
@@ -1,37 +1,25 @@
-# This file was created automatically by SWIG 1.3.29.
+# This file was created automatically by SWIG.
 # Don't modify this file, modify the SWIG interface instead.
 # This file is compatible with both classic and new-style classes.
 
 import _freeswitch
-import new
-new_instancemethod = new.instancemethod
-def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
-    if (name == "thisown"): return self.this.own(value)
+
+def _swig_setattr(self,class_type,name,value):
     if (name == "this"):
-        if type(value).__name__ == 'PySwigObject':
-            self.__dict__[name] = value
+        if isinstance(value, class_type):
+            self.__dict__[name] = value.this
+            if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
+            del value.thisown
             return
     method = class_type.__swig_setmethods__.get(name,None)
     if method: return method(self,value)
-    if (not static) or hasattr(self,name):
-        self.__dict__[name] = value
-    else:
-        raise AttributeError("You cannot add attributes to %s" % self)
+    self.__dict__[name] = value
 
-def _swig_setattr(self,class_type,name,value):
-    return _swig_setattr_nondynamic(self,class_type,name,value,0)
-
 def _swig_getattr(self,class_type,name):
-    if (name == "thisown"): return self.this.own()
     method = class_type.__swig_getmethods__.get(name,None)
     if method: return method(self)
     raise AttributeError,name
 
-def _swig_repr(self):
-    try: strthis = "proxy of " + self.this.__repr__()
-    except: strthis = ""
-    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
-
 import types
 try:
     _object = types.ObjectType
@@ -42,31 +30,56 @@
 del types
 
 
+
 fs_core_set_globals = _freeswitch.fs_core_set_globals
+
 fs_core_init = _freeswitch.fs_core_init
+
 fs_core_destroy = _freeswitch.fs_core_destroy
+
 fs_loadable_module_init = _freeswitch.fs_loadable_module_init
+
 fs_loadable_module_shutdown = _freeswitch.fs_loadable_module_shutdown
+
 fs_console_loop = _freeswitch.fs_console_loop
+
 fs_consol_log = _freeswitch.fs_consol_log
+
 fs_consol_clean = _freeswitch.fs_consol_clean
+
 fs_core_session_locate = _freeswitch.fs_core_session_locate
+
 fs_channel_answer = _freeswitch.fs_channel_answer
+
 fs_channel_pre_answer = _freeswitch.fs_channel_pre_answer
+
 fs_channel_hangup = _freeswitch.fs_channel_hangup
+
 fs_channel_set_variable = _freeswitch.fs_channel_set_variable
+
 fs_channel_get_variable = _freeswitch.fs_channel_get_variable
+
 fs_channel_set_state = _freeswitch.fs_channel_set_state
+
 fs_ivr_play_file = _freeswitch.fs_ivr_play_file
+
 fs_switch_ivr_record_file = _freeswitch.fs_switch_ivr_record_file
+
 fs_switch_ivr_sleep = _freeswitch.fs_switch_ivr_sleep
+
 fs_ivr_play_file2 = _freeswitch.fs_ivr_play_file2
+
 fs_switch_ivr_collect_digits_callback = _freeswitch.fs_switch_ivr_collect_digits_callback
+
 fs_switch_ivr_collect_digits_count = _freeswitch.fs_switch_ivr_collect_digits_count
+
 fs_switch_ivr_originate = _freeswitch.fs_switch_ivr_originate
+
 fs_switch_ivr_session_transfer = _freeswitch.fs_switch_ivr_session_transfer
+
 fs_switch_ivr_speak_text = _freeswitch.fs_switch_ivr_speak_text
+
 fs_switch_channel_get_variable = _freeswitch.fs_switch_channel_get_variable
-fs_switch_channel_set_variable = _freeswitch.fs_switch_channel_set_variable
 
+fs_switch_channel_set_variable = _freeswitch.fs_switch_channel_set_variable
 



More information about the Freeswitch-svn mailing list