This file contains 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
# Basic dumb abstraction. | |
class Base(object): | |
def name(self): | |
return self._name | |
# .... | |
# MegaBase: an abstraction that we can work with. | |
# Classic OO and derived from Base. |
This file contains 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
/* strtab.c */ | |
#include <stdlib.h> | |
#include <stdio.h> | |
char *base = ""; | |
#define STRING_ADDRESS(id) (base+id) | |
#define STRING_ID(address) (signed short)((address)-base) | |
signed short foo(void) |
NewerOlder