This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// gtk-method-patching.c: an example of patching GTK methods. | |
// gcc `pkg-config --libs --cflags gtk+-3.0` gtk-method-patching.c | |
#include <gtk/gtk.h> | |
typedef void (* get_preferred_width) (GtkWidget *, gint *, gint *); | |
get_preferred_width original; // A place to store real function | |
void patched_gpw (GtkWidget *w, gint *min_w, gint *nat_w) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
typedef struct { | |
int foo; | |
int bar; | |
} A; | |
typedef struct { | |
char foo; | |
char bar; | |
} B; |