File: template-hsc-gtk2hs.h

package info (click to toggle)
haskell-gtk 0.14.10-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,964 kB
  • sloc: haskell: 3,346; ansic: 827; makefile: 161
file content (17 lines) | stat: -rw-r--r-- 582 bytes parent folder | download | duplicates (17)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef _TEMPLATE_HSC_GTK2HS_H_
#define _TEMPLATE_HSC_GTK2HS_H_

#include <glib.h>

#define hsc_gtk2hs_type(t)                        \
  if ((t)(int)(t)1.4 == (t)1.4)                   \
    printf ("%s%" G_GSIZE_FORMAT,                 \
      (t)(-1) < (t)0 ? "Int" : "Word",            \
            sizeof (t) * 8);                      \
  else                                            \
    printf ("%s",                                 \
      sizeof (t) >  sizeof (double) ? "LDouble" : \
      sizeof (t) == sizeof (double) ? "Double"  : \
            "Float");

#endif