diff options
author | Jeff Darcy <jdarcy@redhat.com> | 2014-03-04 14:42:40 +0000 |
---|---|---|
committer | Jeff Darcy <jdarcy@redhat.com> | 2014-03-04 14:42:40 +0000 |
commit | 0de07f4189cbd191a765c60ed3d7c72f72112e68 (patch) | |
tree | 83781a0df06c9110c6f3db12caad23ea00832b53 /xlators/bindings/python/src/glusterstack.py | |
parent | c28972ea53cc7cdb91c7aac01754dd7f0b66e1a7 (diff) | |
parent | 9f45d0f6212d6d5c96dafc4aba73d9d12b39c3d6 (diff) |
Merge branch 'upstream' into merge
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Conflicts:
api/src/glfs-fops.c
libglusterfs/src/syncop.c
libglusterfs/src/syncop.h
Change-Id: I8c3fa7a20fb167d9e6bc2749e177c0c8b366827b
Diffstat (limited to 'xlators/bindings/python/src/glusterstack.py')
-rw-r--r-- | xlators/bindings/python/src/glusterstack.py | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/xlators/bindings/python/src/glusterstack.py b/xlators/bindings/python/src/glusterstack.py deleted file mode 100644 index 0c071ae98..000000000 --- a/xlators/bindings/python/src/glusterstack.py +++ /dev/null @@ -1,48 +0,0 @@ - -# Copyright (c) 2007-2012 Red Hat, Inc. <http://www.redhat.com> -# This file is part of GlusterFS. -# -# This file is licensed to you under your choice of the GNU Lesser -# General Public License, version 3 or any later version (LGPLv3 or -# later), or the GNU General Public License, version 2 (GPLv2), in all -# cases as published by the Free Software Foundation. - -from ctypes import * -from glustertypes import * - -libc = CDLL("libc.so.6") -calloc = libc.calloc -calloc.argtypes = [c_int, c_int] -calloc.restype = c_void_p - -# TODO: Can these be done in C somehow? -def stack_wind(frame, rfn, obj, fn, *params): - """Frame is a frame object""" - _new = cast(calloc(1, sizeof(call_frame_t)), POINTER(call_frame_t)) - _new[0].root = frame.root - _new[0].next = frame.root[0].frames.next - _new[0].prev = pointer(frame.root[0].frames) - if frame.root[0].frames.next: - frame.root[0].frames.next[0].prev = _new - frame.root[0].frames.next = _new - _new[0].this = obj - # TODO: Type checking like tmp_cbk? - _new[0].ret = rfn - _new[0].parent = pointer(frame) - _new[0].cookie = cast(_new, c_void_p) - # TODO: Initialize lock - #_new.lock.init() - frame.ref_count += 1 - fn(_new, obj, *params) - -def stack_unwind(frame, *params): - """Frame is a frame object""" - fn = frame[0].ret - parent = frame[0].parent[0] - parent.ref_count -= 1 - - op_ret = params[0] - op_err = params[1] - params = params[2:] - fn(parent, call_frame_t.from_address(frame[0].cookie), parent.this, - op_ret, op_err, *params) |