~ubuntu-branches/ubuntu/precise/koffice/precise

« back to all changes in this revision

Viewing changes to kexi/scripting/python/CXX/cxx530-unsigned.patch

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2006-04-20 21:38:53 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060420213853-j5lxluqvymxt2zny
Tags: 1:1.5.0-0ubuntu2
UbuntuĀ uploadĀ 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
--- ../_cxx_5.3.0/CXX/Objects.hxx       2004-11-14 21:52:52.000000000 +0100
2
 
+++ CXX/Objects.hxx     2004-12-14 17:02:56.000000000 +0100
3
 
@@ -572,6 +572,12 @@
4
 
                        {
5
 
                        validate();
6
 
                        }
7
 
+               // create from unsigned long
8
 
+               explicit Long (unsigned long v)
9
 
+                       : Object(PyLong_FromUnsignedLong(v), true)
10
 
+                       {
11
 
+                       validate();
12
 
+                       }
13
 
 
14
 
                // try to create from any object
15
 
                Long (const Object& ob)
16
 
@@ -607,6 +613,10 @@
17
 
                        {
18
 
                        return PyLong_AsDouble (ptr());
19
 
                        }
20
 
+               operator unsigned long() const
21
 
+                       {
22
 
+                       return PyLong_AsUnsignedLong (ptr());
23
 
+                       }
24
 
                // assign from an int
25
 
                Long& operator= (int v)
26
 
                        {
27
 
@@ -619,6 +629,13 @@
28
 
                        set(PyLong_FromLong (v), true);
29
 
                        return *this;
30
 
                        }
31
 
+               // assign from unsigned long
32
 
+               Long& operator= (unsigned long v)
33
 
+                       {
34
 
+                       set(PyLong_FromUnsignedLong (v), true);
35
 
+                       return *this;
36
 
+                       }
37
 
+
38
 
                };
39
 
 
40
 
        // ===============================================