Fix Python bindings on 32 bit arch with upstream patch.

This commit is contained in:
Richard W.M. Jones 2011-04-28 09:42:26 +01:00
parent 5e1b02358d
commit 5e4fb172e5
2 changed files with 172 additions and 1 deletions

View File

@ -0,0 +1,164 @@
--- python/hivex-py.c.orig 2011-04-28 09:46:43.687712232 +0100
+++ python/hivex-py.c 2011-04-28 09:46:45.843757332 +0100
@@ -3,7 +3,7 @@
* generator/generator.ml
* ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST.
*
- * Copyright (C) 2009-2010 Red Hat Inc.
+ * Copyright (C) 2009-2011 Red Hat Inc.
* Derived from code by Petter Nordahl-Hagen under a compatible license:
* Copyright (c) 1997-2007 Petter Nordahl-Hagen.
* Derived from code by Markus Stephany under a compatible license:
@@ -290,7 +290,7 @@
PyObject *py_h;
long node;
- if (!PyArg_ParseTuple (args, (char *) "OL:hivex_node_name", &py_h, &node))
+ if (!PyArg_ParseTuple (args, (char *) "Ol:hivex_node_name", &py_h, &node))
return NULL;
h = get_handle (py_h);
r = hivex_node_name (h, node);
@@ -313,7 +313,7 @@
PyObject *py_h;
long node;
- if (!PyArg_ParseTuple (args, (char *) "OL:hivex_node_children", &py_h, &node))
+ if (!PyArg_ParseTuple (args, (char *) "Ol:hivex_node_children", &py_h, &node))
return NULL;
h = get_handle (py_h);
r = hivex_node_children (h, node);
@@ -339,7 +339,7 @@
long node;
char *name;
- if (!PyArg_ParseTuple (args, (char *) "OLs:hivex_node_get_child", &py_h, &node, &name))
+ if (!PyArg_ParseTuple (args, (char *) "Ols:hivex_node_get_child", &py_h, &node, &name))
return NULL;
h = get_handle (py_h);
r = hivex_node_get_child (h, node, name);
@@ -367,7 +367,7 @@
PyObject *py_h;
long node;
- if (!PyArg_ParseTuple (args, (char *) "OL:hivex_node_parent", &py_h, &node))
+ if (!PyArg_ParseTuple (args, (char *) "Ol:hivex_node_parent", &py_h, &node))
return NULL;
h = get_handle (py_h);
r = hivex_node_parent (h, node);
@@ -390,7 +390,7 @@
PyObject *py_h;
long node;
- if (!PyArg_ParseTuple (args, (char *) "OL:hivex_node_values", &py_h, &node))
+ if (!PyArg_ParseTuple (args, (char *) "Ol:hivex_node_values", &py_h, &node))
return NULL;
h = get_handle (py_h);
r = hivex_node_values (h, node);
@@ -415,7 +415,7 @@
long node;
char *key;
- if (!PyArg_ParseTuple (args, (char *) "OLs:hivex_node_get_value", &py_h, &node, &key))
+ if (!PyArg_ParseTuple (args, (char *) "Ols:hivex_node_get_value", &py_h, &node, &key))
return NULL;
h = get_handle (py_h);
r = hivex_node_get_value (h, node, key);
@@ -438,7 +438,7 @@
PyObject *py_h;
long val;
- if (!PyArg_ParseTuple (args, (char *) "OL:hivex_value_key", &py_h, &val))
+ if (!PyArg_ParseTuple (args, (char *) "Ol:hivex_value_key", &py_h, &val))
return NULL;
h = get_handle (py_h);
r = hivex_value_key (h, val);
@@ -463,7 +463,7 @@
PyObject *py_h;
long val;
- if (!PyArg_ParseTuple (args, (char *) "OL:hivex_value_type", &py_h, &val))
+ if (!PyArg_ParseTuple (args, (char *) "Ol:hivex_value_type", &py_h, &val))
return NULL;
h = get_handle (py_h);
r = hivex_value_type (h, val, &t, &len);
@@ -488,7 +488,7 @@
PyObject *py_h;
long val;
- if (!PyArg_ParseTuple (args, (char *) "OL:hivex_value_value", &py_h, &val))
+ if (!PyArg_ParseTuple (args, (char *) "Ol:hivex_value_value", &py_h, &val))
return NULL;
h = get_handle (py_h);
r = hivex_value_value (h, val, &t, &len);
@@ -512,7 +512,7 @@
PyObject *py_h;
long val;
- if (!PyArg_ParseTuple (args, (char *) "OL:hivex_value_string", &py_h, &val))
+ if (!PyArg_ParseTuple (args, (char *) "Ol:hivex_value_string", &py_h, &val))
return NULL;
h = get_handle (py_h);
r = hivex_value_string (h, val);
@@ -535,7 +535,7 @@
PyObject *py_h;
long val;
- if (!PyArg_ParseTuple (args, (char *) "OL:hivex_value_multiple_strings", &py_h, &val))
+ if (!PyArg_ParseTuple (args, (char *) "Ol:hivex_value_multiple_strings", &py_h, &val))
return NULL;
h = get_handle (py_h);
r = hivex_value_multiple_strings (h, val);
@@ -560,7 +560,7 @@
PyObject *py_h;
long val;
- if (!PyArg_ParseTuple (args, (char *) "OL:hivex_value_dword", &py_h, &val))
+ if (!PyArg_ParseTuple (args, (char *) "Ol:hivex_value_dword", &py_h, &val))
return NULL;
h = get_handle (py_h);
r = hivex_value_dword (h, val);
@@ -584,7 +584,7 @@
PyObject *py_h;
long val;
- if (!PyArg_ParseTuple (args, (char *) "OL:hivex_value_qword", &py_h, &val))
+ if (!PyArg_ParseTuple (args, (char *) "Ol:hivex_value_qword", &py_h, &val))
return NULL;
h = get_handle (py_h);
r = hivex_value_qword (h, val);
@@ -632,7 +632,7 @@
long parent;
char *name;
- if (!PyArg_ParseTuple (args, (char *) "OLs:hivex_node_add_child", &py_h, &parent, &name))
+ if (!PyArg_ParseTuple (args, (char *) "Ols:hivex_node_add_child", &py_h, &parent, &name))
return NULL;
h = get_handle (py_h);
r = hivex_node_add_child (h, parent, name);
@@ -655,7 +655,7 @@
PyObject *py_h;
long node;
- if (!PyArg_ParseTuple (args, (char *) "OL:hivex_node_delete_child", &py_h, &node))
+ if (!PyArg_ParseTuple (args, (char *) "Ol:hivex_node_delete_child", &py_h, &node))
return NULL;
h = get_handle (py_h);
r = hivex_node_delete_child (h, node);
@@ -681,7 +681,7 @@
py_set_values values;
PyObject *py_values;
- if (!PyArg_ParseTuple (args, (char *) "OLO:hivex_node_set_values", &py_h, &node, &py_values))
+ if (!PyArg_ParseTuple (args, (char *) "OlO:hivex_node_set_values", &py_h, &node, &py_values))
return NULL;
h = get_handle (py_h);
if (get_values (py_values, &values) == -1)
@@ -710,7 +710,7 @@
hive_set_value val;
PyObject *py_val;
- if (!PyArg_ParseTuple (args, (char *) "OLO:hivex_node_set_value", &py_h, &node, &py_val))
+ if (!PyArg_ParseTuple (args, (char *) "OlO:hivex_node_set_value", &py_h, &node, &py_val))
return NULL;
h = get_handle (py_h);
if (get_value (py_val, &val) == -1)

View File

@ -7,7 +7,7 @@
Name: hivex Name: hivex
Version: 1.2.5 Version: 1.2.5
Release: 1%{?dist} Release: 2%{?dist}
Summary: Read and write Windows Registry binary hive files Summary: Read and write Windows Registry binary hive files
Group: Development/Libraries Group: Development/Libraries
@ -38,6 +38,9 @@ Conflicts: libguestfs <= 1:1.0.84
# Fix Perl directory install path. # Fix Perl directory install path.
Patch0: %{name}-1.2.3-dirs.patch Patch0: %{name}-1.2.3-dirs.patch
# Fix Python bindings on 32 bit arch (patch is upstream).
Patch1: hivex-1.2.5-python-fix-for-i386-integer-size-issue.patch
%description %description
Hive files are the undocumented binary blobs that Windows uses to Hive files are the undocumented binary blobs that Windows uses to
@ -144,6 +147,7 @@ python-%{name} contains Python bindings for %{name}.
%setup -q %setup -q
%patch0 -p1 -b .dirs %patch0 -p1 -b .dirs
%patch1 -p0 -b .32bit
%build %build
@ -252,6 +256,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Thu Apr 28 2011 Richard W.M. Jones <rjones@redhat.com> - 1.2.5-2
- Fix Python bindings on 32 bit arch with upstream patch.
* Wed Apr 13 2011 Richard W.M. Jones <rjones@redhat.com> - 1.2.5-1 * Wed Apr 13 2011 Richard W.M. Jones <rjones@redhat.com> - 1.2.5-1
- New upstream version 1.2.5. - New upstream version 1.2.5.
- This version fixes a number of important memory issues found by - This version fixes a number of important memory issues found by