[pacman-dev] pm_transflag enum

Dario Freddi drf54321 at gmail.com
Thu May 8 13:39:33 EDT 2008


Hello,
I know this might look as a stupid question, though I can't manage to 
use multiple flags, just as pacman does. This bunch of code:

pmtransflag_t flgs = PM_TRANS_FLAG_NOSCRIPTLET;
	
flgs |= PM_TRANS_FLAG_FORCE;

Simply doesn't compile, returning:

/home/drf/Development/shaman/trunk/shaman/src/AlpmHandler.cpp: 
In member function ‘bool 
AlpmHandler::initTransaction(pmtranstype_t, pmtransflag_t, bool)’:
/home/drf/Development/shaman/trunk/shaman/src/AlpmHandler.cpp:155: 
error: invalid conversion from ‘int’ to ‘pmtransflag_t’

Though, pacman just does it this way, so I can't get where I am 
wrong. Any help would be appreciated.

Cheers
Dario




More information about the pacman-dev mailing list