Sha256: e736f93de501c836e89dac74f3fa87936cce7040f1e164f38cb3003c9aa25ca5

Contents?: true

Size: 1.08 KB

Versions: 1

Compression:

Stored size: 1.08 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 %>
<%= format_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 %>
<%= format_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 %>
<%= format_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.13.0 etc/templates/c.erb