Commit a4c0dddee94276bd7400a1c1b83ff1b1ac285b5c
1 parent
bf44e21a
Put buffer and buffer_length at beginning of args for consistency (and so we can…
… use *args for the rest in python)
Showing
2 changed files
with
4 additions
and
4 deletions
openbr/openbr.cpp
| @@ -361,7 +361,7 @@ bool br_img_is_empty(br_template tmpl) | @@ -361,7 +361,7 @@ bool br_img_is_empty(br_template tmpl) | ||
| 361 | return t->m().empty(); | 361 | return t->m().empty(); |
| 362 | } | 362 | } |
| 363 | 363 | ||
| 364 | -int br_get_filename(br_template tmpl, char * buffer, int buffer_length) | 364 | +int br_get_filename(char * buffer, int buffer_length, br_template tmpl) |
| 365 | { | 365 | { |
| 366 | return partialCopy(reinterpret_cast<Template*>(tmpl)->file.name, buffer, buffer_length); | 366 | return partialCopy(reinterpret_cast<Template*>(tmpl)->file.name, buffer, buffer_length); |
| 367 | } | 367 | } |
| @@ -372,7 +372,7 @@ void br_set_filename(br_template tmpl, const char *filename) | @@ -372,7 +372,7 @@ void br_set_filename(br_template tmpl, const char *filename) | ||
| 372 | t->file.name = filename; | 372 | t->file.name = filename; |
| 373 | } | 373 | } |
| 374 | 374 | ||
| 375 | -int br_get_metadata_string(br_template tmpl, const char *key, char * buffer, int buffer_length) | 375 | +int br_get_metadata_string(char * buffer, int buffer_length, br_template tmpl, const char *key) |
| 376 | { | 376 | { |
| 377 | Template *t = reinterpret_cast<Template*>(tmpl); | 377 | Template *t = reinterpret_cast<Template*>(tmpl); |
| 378 | QVariant qvar = t->file.value(key); | 378 | QVariant qvar = t->file.value(key); |
openbr/openbr.h
| @@ -512,7 +512,7 @@ BR_EXPORT bool br_img_is_empty(br_template tmpl); | @@ -512,7 +512,7 @@ BR_EXPORT bool br_img_is_empty(br_template tmpl); | ||
| 512 | * \brief Get the filename for a br::Template | 512 | * \brief Get the filename for a br::Template |
| 513 | * \note \ref input_string_buffer | 513 | * \note \ref input_string_buffer |
| 514 | */ | 514 | */ |
| 515 | -BR_EXPORT int br_get_filename(br_template tmpl, char * buffer, int buffer_length); | 515 | +BR_EXPORT int br_get_filename(char * buffer, int buffer_length, br_template tmpl); |
| 516 | /*! | 516 | /*! |
| 517 | * \brief Set the filename for a br::Template. | 517 | * \brief Set the filename for a br::Template. |
| 518 | */ | 518 | */ |
| @@ -521,7 +521,7 @@ BR_EXPORT void br_set_filename(br_template tmpl, const char *filename); | @@ -521,7 +521,7 @@ BR_EXPORT void br_set_filename(br_template tmpl, const char *filename); | ||
| 521 | * \brief Get metadata as a string for the given key in the given template. | 521 | * \brief Get metadata as a string for the given key in the given template. |
| 522 | * \note \ref input_string_buffer | 522 | * \note \ref input_string_buffer |
| 523 | */ | 523 | */ |
| 524 | -BR_EXPORT int br_get_metadata_string(br_template, const char *key, char * buffer, int buffer_length); | 524 | +BR_EXPORT int br_get_metadata_string(char * buffer, int buffer_length, br_template tmpl, const char *key); |
| 525 | /*! | 525 | /*! |
| 526 | * \brief Enroll a br::Template from the C API! Returns a pointer to a br::TemplateList | 526 | * \brief Enroll a br::Template from the C API! Returns a pointer to a br::TemplateList |
| 527 | * \param tmpl Pointer to a br::Template. | 527 | * \param tmpl Pointer to a br::Template. |