Hola:

Estoy teniendo una dificultad con declaraciones. En la
seccion marcada como "antes", esta todo ok. "Luego",
cuando agrego t_api en la firma de *inner_read, se me
produce una dependencia cíclica que no se como
resolver. 

Quizas el problema sea con la declaración del puntero
a  funcion, por eso agregué el "creo" al subject

Agradeceré orientación al respecto.

Carlos Pantelides

####################### antes #######################


[main.h]
#include "cache.h"
typedef struct {
  Cache * cache;
} t_api;

-----------------------------------------------------
[cache.h]

typedef struct {
 void  (*inner_read)() ;
} Cache;

####################### luego #######################
[main.h]
typedef struct {
   ...
} t_rec;

#include "cache.h"

typedef struct {
  Cache * cache;
} t_api;

-----------------------------------------------------
[cache.h]
typedef struct {
 int   cache_size;
 void  (*inner_read)(t_api *, t_rec *) ;
} Cache;

##################### mas luego #####################
[main.h]
typedef struct {
   ...
} t_rec;

struct t_api;

#include "cache.h"

struct t_api{
  FILE * imp_file;
  Cache * cache;
};




      
____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
_______________________________________________
Lista de correo Programacion.
[email protected]
http://listas.fi.uba.ar/mailman/listinfo/programacion

Responder a