Is impossible to preserve the GeisInstance value between functions/methods
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Geis |
Fix Released
|
High
|
Stephen M. Webb |
Bug Description
Hi!
I'm using utouch-geis-dev version 2.0.9 in Natty.
Now is impossible to preserve the value of GeisInstance between the methods of a class or between functions.
I'm trying to make something like this:
GeisInstance geisInstance;
void Class::init() {
// [...]
if(
}
// [...]
}
void Class::
// [...]
geis_
// [...]
}
I also try to make a memcpy, but the definition of GeisInstance:
typedef struct _GeisInstance *GeisInstance;
Makes impossible know the size of _GeisInstance.
I don't know if this problem will have an easy solution...
Greetings!
Related branches
- Henrik Rydberg (community): Approve
-
Diff: 287 lines (+183/-9)5 files modifiedChangeLog (+9/-0)
libutouch-geis/geis_v1.c (+9/-9)
testsuite/geis1/Makefile.am (+1/-0)
testsuite/geis1/check_geis1_api.c (+2/-0)
testsuite/geis1/check_subscription.c (+162/-0)
Changed in utouch-geis: | |
milestone: | none → 2.0.11 |
assignee: | nobody → Stephen M. Webb (bregma) |
importance: | Undecided → High |
Changed in utouch-geis: | |
status: | In Progress → Fix Committed |
Changed in utouch-geis: | |
status: | Fix Committed → Fix Released |
It's not clear to me what problem you are describing. Certainly you can preserve a GeisInstance between function calls in the same way any other datum is preserved.
Attached is an example C++ program, similar to geistest, wrapping the geis API in a class, preserving the GeisInstance between member function calls.
A GeisInstance is an opaque pointer. You may copy the pointer as much as you wish, but copying the underlying object makes no more sense than copying a FILE object in the C standard IO library.