Commit graph

20 commits

Author SHA1 Message Date
Olek Wojnar
7f9ff2246d Remove CVS $Id tags
The legacy tags are causing build issues in Debian.
2013-07-15 20:31:59 +02:00
Erik Ogenvik
b4a48f8528 Added method turning Message into native struct.
This is needed because when you work with Messages in python, they will
get converted into native structs, but only if you do access from the
Py_Message. It's a bit hard to explain, but I'll try:

Suppose you have a map "a" which contains a map "b" which contains a
list "c".
When you first accesses "b" map, you do this through "a" which is of
type Py_Message and you'll get back a native Python dict, because of the
conversion code in Py_Message. When you then access the "c" list, you do
this though the native dict, and no Py_Message conversion code is run.
So you then get a raw Py_Message instance ("c"). This instance can't be
traversed etc.. Instead it must be converted to the native type.

However, a better approach would probably be to implement tp_iter so
that list elements can be iterated over.
2013-04-21 11:00:24 +02:00
Erik Ogenvik
e78c61b3ae Return string if message is string. 2013-03-31 21:02:13 +02:00
Alistair Riddoch
a310b02781 Remove unnecessary conditional 2012-05-15 11:29:13 +01:00
Alistair Riddoch
94df02836b Add a repr() operation for debugging 2012-03-24 14:06:24 +00:00
Alistair Riddoch
8c41b6a129 Expect the right errors throughout 2012-01-04 13:59:18 +00:00
Alistair Riddoch
8d5a0b59cf Whitespace fix 2011-12-27 11:29:09 +01:00
Alistair Riddoch
236e3e52f5 Update to modern object protocol 2011-12-27 11:27:04 +01:00
Alistair Riddoch
c71c146549 Expose two formerly internal functions
These are way type safer when doing more specific conversions.
2011-12-22 17:18:19 +00:00
Alistair Riddoch
5dad5b5493 Add () to logic. Not required, but improves readability 2011-09-05 12:18:16 +01:00
Alistair Riddoch
20d152d52b Cover not-equals, and fill out the tests 2011-09-02 19:04:33 +01:00
Alistair Riddoch
b2245ed94f Support rich comparison in Python Atlas::Message 2011-09-02 14:30:15 +01:00
Alistair Riddoch
411d472879 Clean up and check where both conditions return. 2009-11-11 07:13:09 +00:00
Alistair Riddoch
4f734d050d Remove commented out obsolete implementations of new object creation. 2009-07-04 19:03:29 +01:00
Alistair Riddoch
1c260a8201 Remove unnecessary tp_new implementations from all bindings that don't need them 2009-06-04 15:29:34 +01:00
Alistair Riddoch
e8137b6df4 Update tp_dealloc for Py_Message to match modern Python conventions. 2009-06-03 18:16:59 +01:00
Alistair Riddoch
a8dbd887b4 Convert PyObject to Atlas::Message from return by value and clean up failures. 2009-05-27 19:42:22 +01:00
Alistair Riddoch
4bf6963697 Rename excessively verbose PyMessageElement to PyMessage. 2009-05-27 18:22:56 +01:00
Alistair Riddoch
f1a5a44bb2 Update all includes for rename of Py_Object.h to Py_Message.h 2009-05-27 14:10:26 +01:00
Alistair Riddoch
6fe7999fc4 Rename Py_Object.* to Py_Message.* to match type name 2009-05-27 14:05:27 +01:00
Renamed from rulesets/Py_Object.cpp (Browse further)