[PATCH v3 02/30] syntax-check: prohibit_virXXXFree: skip strings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We should allow strings (not the functions) in the format of
"virDomainFree" and friends.

This fixes an error in latter commit "scripts: apibuild: parse
'Since' for functions" as it uses this function names as keys
in a dictionary.

Fixes:
 |  ...
 |  prohibit_virXXXFree
 |  libvirt/scripts/apibuild.py:163:        'virDomainFree': '0.0.1',
 |  make: Leaving directory '/home/toso/src/libvirt/build/build-aux'
 |  stderr:
 |  build-aux/syntax-check.mk: avoid using virXXXFree, use virObjectUnref instead
 |  make: *** [libvirt/build-aux/syntax-check.mk:829: sc_prohibit_virXXXFree] Error 1

Signed-off-by: Victor Toso <victortoso@xxxxxxxxxx>
---
 build-aux/syntax-check.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk
index eb403f3d3f..07e0295995 100644
--- a/build-aux/syntax-check.mk
+++ b/build-aux/syntax-check.mk
@@ -827,7 +827,7 @@ sc_prohibit_system_error_with_vir_err:
 # docs, examples, tools, src/libvirt-*.c, and include/libvirt/libvirt-*.h
 sc_prohibit_virXXXFree:
 	@prohibit='\bvir(Domain|Network|NodeDevice|StorageVol|StoragePool|Stream|Secret|NWFilter|Interface|DomainSnapshot)Free\b' \
-	exclude='sc_prohibit_virXXXFree' \
+	exclude="sc_prohibit_virXXXFree|'vir.*?Free'" \
 	halt='avoid using virXXXFree, use virObjectUnref instead' \
 	  $(_sc_search_regexp)
 
-- 
2.35.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux