Skip to content

Commit

Permalink
add wrapture template
Browse files Browse the repository at this point in the history
  • Loading branch information
goatshriek committed Mar 19, 2024
1 parent 5726ceb commit 24ae757
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 4 deletions.
4 changes: 0 additions & 4 deletions docs/examples/chain/chain_example.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@
* limitations under the License.
*/

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stumpless.h>
#include <time.h>


int
Expand Down
32 changes: 32 additions & 0 deletions tools/wrapture/chain_target.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: "0.5.0"
classes:
- name: "ChainTarget"
doc: >
A target allowing entries to be sent to a sequence of targets.
namespace: "stumpless"
equivalent-struct:
name: "stumpless_target"
includes: "stumpless/target.h"
constructors:
- doc: "Creates a new chain target."
wrapped-function:
name: "stumpless_new_chain"
includes: "stumpless/target/chain.h"
params:
- name: "name"
doc: "The name of this target."
type: "const char *"
return:
type: "equivalent-struct-pointer"
use-template: "pointer-return-error-check"
destructor:
doc: >
Closes this chain and releases all memory and other resources held by
it. Does not close the targets in the chain.
wrapped-function:
name: "stumpless_close_chain_only"
includes: "stumpless/target/chain.h"
params:
- name: "equivalent-struct-pointer"
functions:
- use-template: "common-target-functions"

0 comments on commit 24ae757

Please sign in to comment.