Tag Archives: attribute

Custom prolog and epilog for a function in C++

Traditionally, the compiler is responsible for creating the prolog and epilog of a function. However, custom prolog and epilog code can be written if a function has been declared with the naked attribute. The snippet below demonstrates a naked function with custom prolog and epilog code. __declspec(naked) void foo(){ // Prolog __asm { push ebp [...]

Posted in Assembler, C++ | Also tagged , , , , , , , , , , , , , | Leave a comment

Classes and inheritance in Python

This example is similar to the Inheritance in PHP snippet. Python is used instead of PHP.

Posted in Python | Also tagged , , , , , , , | Leave a comment