Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem: zframe_meta documentation is incorrect #1710

Merged
merged 1 commit into from
Jul 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2463,7 +2463,8 @@ This is the class interface:
zframe_data (zframe_t *self);

// Return meta data property for frame
// Caller must free string when finished with it.
// The caller shall not modify or free the returned value, which shall be
// owned by the message.
CZMQ_EXPORT const char *
zframe_meta (zframe_t *self, const char *property);

Expand Down
3 changes: 2 additions & 1 deletion api/zframe.api
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@

<method name = "meta">
Return meta data property for frame
Caller must free string when finished with it.
The caller shall not modify or free the returned value, which shall be
owned by the message.
<argument name = "property" type = "string" />
<return type = "string" fresh = "0" />
</method>
Expand Down
3 changes: 2 additions & 1 deletion bindings/lua_ffi/czmq_ffi.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,8 @@ byte *
zframe_data (zframe_t *self);

// Return meta data property for frame
// Caller must free string when finished with it.
// The caller shall not modify or free the returned value, which shall be
// owned by the message.
const char *
zframe_meta (zframe_t *self, const char *property);

Expand Down
3 changes: 2 additions & 1 deletion bindings/python/czmq/_czmq_ctypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2539,7 +2539,8 @@ def data(self):
def meta(self, property):
"""
Return meta data property for frame
Caller must free string when finished with it.
The caller shall not modify or free the returned value, which shall be
owned by the message.
"""
return lib.zframe_meta(self._as_parameter_, property)

Expand Down
3 changes: 2 additions & 1 deletion bindings/python_cffi/czmq_cffi/_cdefs.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,8 @@ byte *
zframe_data (zframe_t *self);

// Return meta data property for frame
// Caller must free string when finished with it.
// The caller shall not modify or free the returned value, which shall be
// owned by the message.
const char *
zframe_meta (zframe_t *self, const char *property);

Expand Down
3 changes: 2 additions & 1 deletion bindings/python_cffi/czmq_cffi/cdefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,8 @@
zframe_data (zframe_t *self);

// Return meta data property for frame
// Caller must free string when finished with it.
// The caller shall not modify or free the returned value, which shall be
// owned by the message.
const char *
zframe_meta (zframe_t *self, const char *property);

Expand Down
3 changes: 2 additions & 1 deletion bindings/qml/src/QmlZframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ byte *QmlZframe::data () {

///
// Return meta data property for frame
// Caller must free string when finished with it.
// The caller shall not modify or free the returned value, which shall be
// owned by the message.
const QString QmlZframe::meta (const QString &property) {
return QString (zframe_meta (self, property.toUtf8().data()));
};
Expand Down
3 changes: 2 additions & 1 deletion bindings/qt/src/qzframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ byte * QZframe::data ()

///
// Return meta data property for frame
// Caller must free string when finished with it.
// The caller shall not modify or free the returned value, which shall be
// owned by the message.
const QString QZframe::meta (const QString &property)
{
const QString rv = QString (zframe_meta (self, property.toUtf8().data()));
Expand Down
3 changes: 2 additions & 1 deletion bindings/ruby/lib/czmq/ffi/zframe.rb
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ def data()
end

# Return meta data property for frame
# Caller must free string when finished with it.
# The caller shall not modify or free the returned value, which shall be
# owned by the message.
#
# @param property [String, #to_s, nil]
# @return [String]
Expand Down
3 changes: 2 additions & 1 deletion include/zframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ CZMQ_EXPORT byte *
zframe_data (zframe_t *self);

// Return meta data property for frame
// Caller must free string when finished with it.
// The caller shall not modify or free the returned value, which shall be
// owned by the message.
CZMQ_EXPORT const char *
zframe_meta (zframe_t *self, const char *property);

Expand Down
3 changes: 2 additions & 1 deletion src/zframe.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ zframe_data (zframe_t *self)

// --------------------------------------------------------------------------
// Return meta data property for frame.
// Caller must free string when finished with it.
// The caller shall not modify or free the returned value, which shall be
// owned by the message.

const char *
zframe_meta (zframe_t *self, const char *property)
Expand Down