Sha256: b7d4553de10bbf1a10e4b5dcd87daac4724415400ace996ffd44c86acc82c9d1

Contents?: true

Size: 1.03 KB

Versions: 1

Compression:

Stored size: 1.03 KB

Contents

<% if header? %>
// <%= FFIDB.header %>

<% end %>
#include <stdarg.h>    // for va_list
#include <stdbool.h>   // for _Bool
#include <stddef.h>    // for size_t, wchar_t
#include <stdint.h>    // for {,u}int*_t
#include <sys/types.h> // for off_t, ssize_t
<% for library in @libraries %>
<% if library %>

// <%= library.name %> API
<% end %>
<% for enum in @enums[library] || [] %>

<% if enum.comment %>
// <%= enum.comment %>
<% end %>
enum <%= enum.name %> {
<% for name, value in enum.values || {} %>
  <%= name %> = <%= value %>,
<% end %>
};
<% end %>
<% for struct in @structs[library] || [] %>

<% if struct.comment %>
// <%= struct.comment %>
<% end %>
struct <%= struct.name %> {
<% for name, type in struct.fields || {} %>
  <%= type %> <%= name %>;
<% end %>
};
<% end %>
<% for function in @functions[library] || [] %>

<% if function.comment %>
// <%= function.comment %>
<% end %>
extern <%= function.type %> <%= function.name %>(<%=
  function.parameters.each_value.map { |p| "#{p.type} #{p.name}" }.join(', ')
%>);
<% end %>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ffidb-0.12.0 etc/templates/c.erb