1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
diff --git a/OpenEXR.cpp b/OpenEXR.cpp
index 99ff258..d73372c 100644
--- a/OpenEXR.cpp
+++ b/OpenEXR.cpp
@@ -62,6 +62,7 @@ typedef int Py_ssize_t;
#include <ImfTimeCodeAttribute.h>
#include <ImfVecAttribute.h>
#include <ImfVersion.h>
+#include <ImfFrameBuffer.h>
#include <OpenEXRConfig.h>
@@ -87,8 +88,8 @@ typedef int Py_ssize_t;
#include <algorithm>
#include <iostream>
#include <iomanip>
-#include <iostream>
#include <vector>
+#include <fstream>
using namespace std;
using namespace Imf;
@@ -121,8 +122,8 @@ class C_IStream: public IStream
C_IStream (PyObject *fo):
IStream(""), _fo(fo) {}
virtual bool read (char c[], int n);
- virtual Int64 tellg ();
- virtual void seekg (Int64 pos);
+ virtual uint64_t tellg ();
+ virtual void seekg (uint64_t pos);
virtual void clear ();
virtual const char* fileName() const;
private:
@@ -148,7 +149,7 @@ const char* C_IStream::fileName() const
}
-Int64
+uint64_t
C_IStream::tellg ()
{
PyObject *rv = PyObject_CallMethod(_fo, (char*)"tell", NULL);
@@ -157,14 +158,14 @@ C_IStream::tellg ()
long long t = PyLong_AsLong(lrv);
Py_DECREF(lrv);
Py_DECREF(rv);
- return (Int64)t;
+ return (uint64_t)t;
} else {
throw Iex::InputExc("tell failed");
}
}
void
-C_IStream::seekg (Int64 pos)
+C_IStream::seekg (uint64_t pos)
{
PyObject *data = PyObject_CallMethod(_fo, (char*)"seek", (char*)"(L)", pos);
if (data != NULL) {
@@ -186,8 +187,8 @@ class C_OStream: public OStream
public:
C_OStream (PyObject *fo): OStream(""), _fo(fo) {}
virtual void write (const char *c, int n);
- virtual Int64 tellp ();
- virtual void seekp (Int64 pos);
+ virtual uint64_t tellp ();
+ virtual void seekp (uint64_t pos);
virtual void clear ();
virtual const char* fileName() const;
private:
@@ -212,7 +213,7 @@ const char* C_OStream::fileName() const
}
-Int64
+uint64_t
C_OStream::tellp ()
{
PyObject *rv = PyObject_CallMethod(_fo, (char*)"tell", NULL);
@@ -221,14 +222,14 @@ C_OStream::tellp ()
long long t = PyLong_AsLong(lrv);
Py_DECREF(lrv);
Py_DECREF(rv);
- return (Int64)t;
+ return (uint64_t)t;
} else {
throw Iex::InputExc("tell failed");
}
}
void
-C_OStream::seekp (Int64 pos)
+C_OStream::seekp (uint64_t pos)
{
PyObject *data = PyObject_CallMethod(_fo, (char*)"seek", (char*)"(L)", pos);
if (data != NULL) {
|