infix
A JIT-Powered FFI Library for C
Loading...
Searching...
No Matches
Ch01_OutParameters.c File Reference

Cookbook Chapter 1: Working with "Out" Parameters. More...

#include <infix/infix.h>
#include <stdbool.h>
#include <stdio.h>
Include dependency graph for Ch01_OutParameters.c:

Functions

static bool get_user_stats (int user_id, int *out_posts, double *out_score)
 
int main ()
 

Detailed Description

Cookbook Chapter 1: Working with "Out" Parameters.

This example demonstrates a very common C pattern where a function returns its primary output via a pointer argument (an "out" parameter) rather than its direct return value. The signature simply represents this as a pointer type (e.g., *int).

Function Documentation

◆ get_user_stats()

static bool get_user_stats ( int  user_id,
int *  out_posts,
double *  out_score 
)
static

◆ main()

int main ( void  )