[SCM] Samba Shared Repository - branch master updated - 9b16a5ac163025c49b40b7f32f6145da46cd75b8

Jelmer Vernooij jelmer at samba.org
Sat Dec 20 19:33:53 GMT 2008


The branch, master has been updated
       via  9b16a5ac163025c49b40b7f32f6145da46cd75b8 (commit)
       via  28f80dbb7cc7daeb6d285dd26d3ef32a42af93ca (commit)
       via  1f4bd4b82cda56ef27d3942a790fcfb908494d46 (commit)
       via  383e7c4d16bc1c0ea52e42b1bafe456c4982e5ec (commit)
      from  f210fbe68b07cadd8ca3e358b1579a9c602cc7f8 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 9b16a5ac163025c49b40b7f32f6145da46cd75b8
Merge: 28f80dbb7cc7daeb6d285dd26d3ef32a42af93ca f210fbe68b07cadd8ca3e358b1579a9c602cc7f8
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Dec 20 20:33:02 2008 +0100

    Merge branch 'master' of ssh://git.samba.org/data/git/samba into tevent-standalone

commit 28f80dbb7cc7daeb6d285dd26d3ef32a42af93ca
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Dec 20 19:54:13 2008 +0100

    Stop using SWIG for ldb Python bindings.

commit 1f4bd4b82cda56ef27d3942a790fcfb908494d46
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Dec 20 19:23:30 2008 +0100

    Fix standalone compilation of events library.

commit 383e7c4d16bc1c0ea52e42b1bafe456c4982e5ec
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Dec 20 18:06:31 2008 +0100

    Add missing files for standalone build.

-----------------------------------------------------------------------

Summary of changes:
 .gitignore                              |    4 +
 lib/tevent/Makefile.in                  |    1 -
 lib/tevent/autogen.sh                   |    2 -
 lib/{replace => tevent}/config.guess    |    0 
 {examples/VFS => lib/tevent}/config.sub |    0 
 lib/tevent/configure.ac                 |    2 +-
 lib/tevent/events.i                     |   54 -
 lib/tevent/events.py                    |   94 -
 lib/tevent/events_wrap.c                | 3348 -------------------------------
 {examples/VFS => lib/tevent}/install-sh |    0 
 lib/tevent/pytevent.c                   |  110 +
 lib/tevent/rules.mk                     |    2 +-
 lib/tevent/tests.py                     |    2 +-
 lib/tevent/tevent.mk                    |   44 +-
 lib/tevent/tevent_util.c                |    4 +-
 lib/tevent/tevent_util.h                |    1 +
 16 files changed, 139 insertions(+), 3529 deletions(-)
 copy lib/{replace => tevent}/config.guess (100%)
 copy {examples/VFS => lib/tevent}/config.sub (100%)
 delete mode 100644 lib/tevent/events.i
 delete mode 100644 lib/tevent/events.py
 delete mode 100644 lib/tevent/events_wrap.c
 copy {examples/VFS => lib/tevent}/install-sh (100%)
 mode change 100644 => 100755
 create mode 100644 lib/tevent/pytevent.c


Changeset truncated at 500 lines:

diff --git a/.gitignore b/.gitignore
index e2f7500..1dca1fa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -347,3 +347,7 @@ librpc/gen_ndr/*_c.h
 librpc/gen_ndr/*_s.c
 librpc/gen_ndr/cli_named_pipe_auth.[ch]
 librpc/gen_ndr/srv_named_pipe_auth.[ch]
+lib/tevent/Makefile
+lib/tevent/tevent.so
+lib/tevent/libtevent.so*
+lib/tevent/libtevent.a
diff --git a/lib/tevent/Makefile.in b/lib/tevent/Makefile.in
index 9765d35..811cc16 100644
--- a/lib/tevent/Makefile.in
+++ b/lib/tevent/Makefile.in
@@ -22,7 +22,6 @@ SHLD_FLAGS = @SHLD_FLAGS@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PICFLAG = @PICFLAG@
 SHLIBEXT = @SHLIBEXT@
-SWIG = swig
 PYTHON = @PYTHON@
 PYTHON_CONFIG = @PYTHON_CONFIG@
 PYTHON_BUILD_TARGET = @PYTHON_BUILD_TARGET@
diff --git a/lib/tevent/autogen.sh b/lib/tevent/autogen.sh
index fec05f5..7a1e7ab 100755
--- a/lib/tevent/autogen.sh
+++ b/lib/tevent/autogen.sh
@@ -9,8 +9,6 @@ autoheader $IPATHS || exit 1
 
 rm -rf autom4te.cache
 
-swig -O -Wall -python -keyword events.i # Ignore errors for now
-
 echo "Now run ./configure and then make."
 exit 0
 
diff --git a/lib/replace/config.guess b/lib/tevent/config.guess
similarity index 100%
copy from lib/replace/config.guess
copy to lib/tevent/config.guess
diff --git a/examples/VFS/config.sub b/lib/tevent/config.sub
similarity index 100%
copy from examples/VFS/config.sub
copy to lib/tevent/config.sub
diff --git a/lib/tevent/configure.ac b/lib/tevent/configure.ac
index 75719d1..d9d39e0 100644
--- a/lib/tevent/configure.ac
+++ b/lib/tevent/configure.ac
@@ -37,4 +37,4 @@ if test -z "$PYTHON_CONFIG"; then
 	PYTHON_INSTALL_TARGET=""
 	PYTHON_CHECK_TARGET=""
 fi
-AC_OUTPUT(Makefile events.pc)
+AC_OUTPUT(Makefile tevent.pc)
diff --git a/lib/tevent/events.i b/lib/tevent/events.i
deleted file mode 100644
index 7a604a9..0000000
--- a/lib/tevent/events.i
+++ /dev/null
@@ -1,54 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-   Copyright (C) Jelmer Vernooij <jelmer at samba.org> 2007
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-%module(docstring="Event management.",package="samba.events") events;
-
-%import "../../lib/talloc/talloc.i";
-
-%{
-#include "tevent.h"
-typedef struct event_context event;
-%}
-
-typedef struct event_context {
-    %extend {
-        %feature("docstring") event "S.__init__()";
-        event(TALLOC_CTX *mem_ctx) { return event_context_init(mem_ctx); }
-        %feature("docstring") loop_once "S.loop_once() -> int";
-        int loop_once(void);
-        %feature("docstring") loop_wait "S.loop_wait() -> int";
-        int loop_wait(void);
-    }
-} event;
-%talloctype(event);
-
-%typemap(default,noblock=1) struct event_context * {
-    $1 = event_context_init(NULL);
-}
-
-%typemap(default,noblock=1) struct event_context * {
-    $1 = event_context_init(NULL);
-}
-
-struct event_context *event_context_init_byname(TALLOC_CTX *mem_ctx, const char *name);
-
-%feature("docstring") event_backend_list "event_backend_list() -> list";
-const char **event_backend_list(TALLOC_CTX *mem_ctx);
-%feature("docstring") event_set_default_backend "event_set_default_backend(name) -> None";
-%rename(set_default_backend) event_set_default_backend;
-void event_set_default_backend(const char *backend);
diff --git a/lib/tevent/events.py b/lib/tevent/events.py
deleted file mode 100644
index c15ea8b..0000000
--- a/lib/tevent/events.py
+++ /dev/null
@@ -1,94 +0,0 @@
-# This file was automatically generated by SWIG (http://www.swig.org).
-# Version 1.3.36
-#
-# Don't modify this file, modify the SWIG interface instead.
-
-"""
-Event management.
-"""
-
-import _events
-import new
-new_instancemethod = new.instancemethod
-try:
-    _swig_property = property
-except NameError:
-    pass # Python < 2.2 doesn't have 'property'.
-def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
-    if (name == "thisown"): return self.this.own(value)
-    if (name == "this"):
-        if type(value).__name__ == 'PySwigObject':
-            self.__dict__[name] = value
-            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)
-
-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
-    _newclass = 1
-except AttributeError:
-    class _object : pass
-    _newclass = 0
-del types
-
-
-def _swig_setattr_nondynamic_method(set):
-    def set_attr(self,name,value):
-        if (name == "thisown"): return self.this.own(value)
-        if hasattr(self,name) or (name == "this"):
-            set(self,name,value)
-        else:
-            raise AttributeError("You cannot add attributes to %s" % self)
-    return set_attr
-
-
-class event(object):
-    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
-    __repr__ = _swig_repr
-    def __init__(self, *args, **kwargs): 
-        """S.__init__()"""
-        _events.event_swiginit(self,_events.new_event(*args, **kwargs))
-    def loop_once(*args, **kwargs):
-        """S.loop_once() -> int"""
-        return _events.event_loop_once(*args, **kwargs)
-
-    def loop_wait(*args, **kwargs):
-        """S.loop_wait() -> int"""
-        return _events.event_loop_wait(*args, **kwargs)
-
-    __swig_destroy__ = _events.delete_event
-event.loop_once = new_instancemethod(_events.event_loop_once,None,event)
-event.loop_wait = new_instancemethod(_events.event_loop_wait,None,event)
-event_swigregister = _events.event_swigregister
-event_swigregister(event)
-
-event_context_init_byname = _events.event_context_init_byname
-
-def event_backend_list(*args):
-  """event_backend_list() -> list"""
-  return _events.event_backend_list(*args)
-
-def set_default_backend(*args, **kwargs):
-  """event_set_default_backend(name) -> None"""
-  return _events.set_default_backend(*args, **kwargs)
-
-
diff --git a/lib/tevent/events_wrap.c b/lib/tevent/events_wrap.c
deleted file mode 100644
index b8b3a96..0000000
--- a/lib/tevent/events_wrap.c
+++ /dev/null
@@ -1,3348 +0,0 @@
-/* ----------------------------------------------------------------------------
- * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.36
- * 
- * 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
- * changes to this file unless you know what you are doing--modify the SWIG 
- * interface file instead. 
- * ----------------------------------------------------------------------------- */
-
-#define SWIGPYTHON
-#define SWIG_PYTHON_NO_BUILD_NONE
-/* -----------------------------------------------------------------------------
- *  This section contains generic SWIG labels for method/variable
- *  declarations/attributes, and other compiler dependent labels.
- * ----------------------------------------------------------------------------- */
-
-/* template workaround for compilers that cannot correctly implement the C++ standard */
-#ifndef SWIGTEMPLATEDISAMBIGUATOR
-# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
-#  define SWIGTEMPLATEDISAMBIGUATOR template
-# elif defined(__HP_aCC)
-/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
-/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
-#  define SWIGTEMPLATEDISAMBIGUATOR template
-# else
-#  define SWIGTEMPLATEDISAMBIGUATOR
-# endif
-#endif
-
-/* inline attribute */
-#ifndef SWIGINLINE
-# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
-#   define SWIGINLINE inline
-# else
-#   define SWIGINLINE
-# endif
-#endif
-
-/* attribute recognised by some compilers to avoid 'unused' warnings */
-#ifndef SWIGUNUSED
-# if defined(__GNUC__)
-#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
-#     define SWIGUNUSED __attribute__ ((__unused__)) 
-#   else
-#     define SWIGUNUSED
-#   endif
-# elif defined(__ICC)
-#   define SWIGUNUSED __attribute__ ((__unused__)) 
-# else
-#   define SWIGUNUSED 
-# endif
-#endif
-
-#ifndef SWIG_MSC_UNSUPPRESS_4505
-# if defined(_MSC_VER)
-#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
-# endif 
-#endif
-
-#ifndef SWIGUNUSEDPARM
-# ifdef __cplusplus
-#   define SWIGUNUSEDPARM(p)
-# else
-#   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
-# endif
-#endif
-
-/* internal SWIG method */
-#ifndef SWIGINTERN
-# define SWIGINTERN static SWIGUNUSED
-#endif
-
-/* internal inline SWIG method */
-#ifndef SWIGINTERNINLINE
-# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
-#endif
-
-/* exporting methods */
-#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
-#  ifndef GCC_HASCLASSVISIBILITY
-#    define GCC_HASCLASSVISIBILITY
-#  endif
-#endif
-
-#ifndef SWIGEXPORT
-# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
-#   if defined(STATIC_LINKED)
-#     define SWIGEXPORT
-#   else
-#     define SWIGEXPORT __declspec(dllexport)
-#   endif
-# else
-#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
-#     define SWIGEXPORT __attribute__ ((visibility("default")))
-#   else
-#     define SWIGEXPORT
-#   endif
-# endif
-#endif
-
-/* calling conventions for Windows */
-#ifndef SWIGSTDCALL
-# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
-#   define SWIGSTDCALL __stdcall
-# else
-#   define SWIGSTDCALL
-# endif 
-#endif
-
-/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
-#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
-# define _CRT_SECURE_NO_DEPRECATE
-#endif
-
-/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
-#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
-# define _SCL_SECURE_NO_DEPRECATE
-#endif
-
-
-
-/* Python.h has to appear first */
-#include <Python.h>
-
-/* -----------------------------------------------------------------------------
- * swigrun.swg
- *
- * This file contains generic CAPI SWIG runtime support for pointer
- * type checking.
- * ----------------------------------------------------------------------------- */
-
-/* This should only be incremented when either the layout of swig_type_info changes,
-   or for whatever reason, the runtime changes incompatibly */
-#define SWIG_RUNTIME_VERSION "4"
-
-/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
-#ifdef SWIG_TYPE_TABLE
-# define SWIG_QUOTE_STRING(x) #x
-# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
-# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
-#else
-# define SWIG_TYPE_TABLE_NAME
-#endif
-
-/*
-  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
-  creating a static or dynamic library from the swig runtime code.
-  In 99.9% of the cases, swig just needs to declare them as 'static'.
-  
-  But only do this if is strictly necessary, ie, if you have problems
-  with your compiler or so.
-*/
-
-#ifndef SWIGRUNTIME
-# define SWIGRUNTIME SWIGINTERN
-#endif
-
-#ifndef SWIGRUNTIMEINLINE
-# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
-#endif
-
-/*  Generic buffer size */
-#ifndef SWIG_BUFFER_SIZE
-# define SWIG_BUFFER_SIZE 1024
-#endif
-
-/* Flags for pointer conversions */
-#define SWIG_POINTER_DISOWN        0x1
-#define SWIG_CAST_NEW_MEMORY       0x2
-
-/* Flags for new pointer objects */
-#define SWIG_POINTER_OWN           0x1
-
-
-/* 
-   Flags/methods for returning states.
-   
-   The swig conversion methods, as ConvertPtr, return and integer 
-   that tells if the conversion was successful or not. And if not,
-   an error code can be returned (see swigerrors.swg for the codes).
-   
-   Use the following macros/flags to set or process the returning
-   states.
-   
-   In old swig versions, you usually write code as:
-
-     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
-       // success code
-     } else {
-       //fail code
-     }
-
-   Now you can be more explicit as:
-
-    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
-    if (SWIG_IsOK(res)) {
-      // success code
-    } else {
-      // fail code
-    }
-
-   that seems to be the same, but now you can also do
-
-    Type *ptr;
-    int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
-    if (SWIG_IsOK(res)) {
-      // success code
-      if (SWIG_IsNewObj(res) {
-        ...
-	delete *ptr;
-      } else {
-        ...
-      }
-    } else {
-      // fail code
-    }
-    
-   I.e., now SWIG_ConvertPtr can return new objects and you can
-   identify the case and take care of the deallocation. Of course that
-   requires also to SWIG_ConvertPtr to return new result values, as
-
-      int SWIG_ConvertPtr(obj, ptr,...) {         
-        if (<obj is ok>) {			       
-          if (<need new object>) {		       
-            *ptr = <ptr to new allocated object>; 
-            return SWIG_NEWOBJ;		       
-          } else {				       
-            *ptr = <ptr to old object>;	       
-            return SWIG_OLDOBJ;		       
-          } 				       
-        } else {				       
-          return SWIG_BADOBJ;		       
-        }					       
-      }
-
-   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
-   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
-   swig errors code.
-
-   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
-   allows to return the 'cast rank', for example, if you have this
-
-       int food(double)
-       int fooi(int);
-
-   and you call
- 
-      food(1)   // cast rank '1'  (1 -> 1.0)
-      fooi(1)   // cast rank '0'
-
-   just use the SWIG_AddCast()/SWIG_CheckState()
-
-
- */
-#define SWIG_OK                    (0) 
-#define SWIG_ERROR                 (-1)
-#define SWIG_IsOK(r)               (r >= 0)
-#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)  
-
-/* The CastRankLimit says how many bits are used for the cast rank */
-#define SWIG_CASTRANKLIMIT         (1 << 8)
-/* The NewMask denotes the object was created (using new/malloc) */
-#define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
-/* The TmpMask is for in/out typemaps that use temporal objects */
-#define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
-/* Simple returning values */
-#define SWIG_BADOBJ                (SWIG_ERROR)
-#define SWIG_OLDOBJ                (SWIG_OK)
-#define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
-#define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
-/* Check, add and del mask methods */
-#define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
-#define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
-#define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
-#define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
-#define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
-#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
-


-- 
Samba Shared Repository


More information about the samba-cvs mailing list